Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
chore: redirect to legacy issue without plan (#16919)
boojack73e893d5bee1
diff --git a/frontend/src/components/Plan/logic/initialize/index.ts b/frontend/src/components/Plan/logic/initialize/index.tsindex afdcb3b3e8..317d5f52a8 100644--- a/frontend/src/components/Plan/logic/initialize/index.ts+++ b/frontend/src/components/Plan/logic/initialize/index.ts@@ -5,6 +5,7 @@ import {issueServiceClientConnect,rolloutServiceClientConnect,} from "@/grpcweb";+import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";import { projectNamePrefix, usePlanStore } from "@/store";import { EMPTY_ID, UNKNOWN_ID } from "@/types";import { GetIssueRequestSchema } from "@/types/proto-es/v1/issue_service_pb";@@ -13,6 +14,7 @@ import type { Plan, PlanCheckRun } from "@/types/proto-es/v1/plan_service_pb";import { GetRolloutRequestSchema } from "@/types/proto-es/v1/rollout_service_pb";import type { Rollout, TaskRun } from "@/types/proto-es/v1/rollout_service_pb";import { emptyPlan } from "@/types/v1/issue/plan";+import { issueV1Slug } from "@/utils";import { createPlanSkeleton } from "./create";export * from "./create";@@ -120,8 +122,20 @@ export function useInitializePlan(issueResult = newIssue;if (!issueResult.plan) {- // Should not happen, but handle gracefully- throw new Error(`Issue ${issueUid} does not have an associated plan`);+ // Redirect to legacy issue page for issues without plans.+ router.replace({+ name: PROJECT_V1_ROUTE_ISSUE_DETAIL,+ params: {+ projectId,+ issueSlug: issueV1Slug(issueResult.name, issueResult.title),+ },+ });+ return {+ plan: emptyPlan(),+ issue: issueResult,+ rollout: undefined,+ url,+ };}// Fetch the plan using the issue's plan reference