Skip to content

Database governance built for humans and agents — controlling changes and access across every major database.

fix: navigate to created issue after database drawer confirm (#19910)

boojack4874a8770903
diff --git a/frontend/src/react/components/database/CreateDatabaseDrawer.tsx b/frontend/src/react/components/database/CreateDatabaseDrawer.tsx
index 34c0b6647f..970079851c 100644
--- a/frontend/src/react/components/database/CreateDatabaseDrawer.tsx
+++ b/frontend/src/react/components/database/CreateDatabaseDrawer.tsx
@@ -13,7 +13,6 @@ import { useEscapeKey } from "@/react/hooks/useEscapeKey";
import { useVueState } from "@/react/hooks/useVueState";
import { cn } from "@/react/lib/utils";
import { router } from "@/router";
-import { PROJECT_V1_ROUTE_ISSUE_DETAIL } from "@/router/dashboard/projectV1";
import {
experimentalCreateIssueByPlan,
pushNotification,
@@ -38,8 +37,7 @@ import {
} from "@/types/proto-es/v1/plan_service_pb";
import {
enginesSupportCreateDatabase,
- extractIssueUID,
- extractProjectResourceName,
+ getIssueRoute,
instanceV1HasCollationAndCharacterSet,
} from "@/utils";
@@ -351,19 +349,14 @@ export function CreateDatabaseDrawer({
planCreate,
{ skipRollout: true }
);
- router.push({
- name: PROJECT_V1_ROUTE_ISSUE_DETAIL,
- params: {
- projectId: extractProjectResourceName(createdIssue.name),
- issueId: extractIssueUID(createdIssue.name),
- },
- });
onClose();
- } catch {
+ await router.push(getIssueRoute(createdIssue));
+ } catch (error) {
pushNotification({
module: "bytebase",
style: "CRITICAL",
title: t("common.failed"),
+ description: String(error),
});
} finally {
setCreating(false);