Database governance built for humans and agents — controlling changes and access across every major database.
Go cicddata-governancedata-maskingdata-securitydatabase-accessdatabase-governancedevopsdevsecopsflywaygitopsliquibasemongodbmysqloraclepostgresqlschema-migrationssecuritysql-clientsqlservertidb
Do not use computed scopeByPrincipal otherwise it will cause prepareIssueList to refetch everytime we click environment tab
天舟a33d9f35ed1e
diff --git a/frontend/src/views/IssueDashboard.vue b/frontend/src/views/IssueDashboard.vueindex 616bb9edc8..5ec6c1d4da 100644--- a/frontend/src/views/IssueDashboard.vue+++ b/frontend/src/views/IssueDashboard.vue@@ -82,6 +82,16 @@ export default {? (router.currentRoute.value.query.status as string).split(","): [];+ // Applies principal scope if we explicitly specify user in the query parameter+ // or project is NOT present in the query parameter.+ // In other words, if only project is present in the query parameter, then+ // we do NOT apply principal scope, which is the case if we want to list all issues+ // for a particular project.+ // Note: We do not use computed, otherwise it will cause prepareIssueList to refetch everytime we click environment tab+ const scopeByPrincipal =+ !router.currentRoute.value.query.user ||+ !router.currentRoute.value.query.project;+const state = reactive<LocalState>({showOpen: statusList.length == 0 || statusList.includes("open"),showClosed: statusList.length == 0 || statusList.includes("closed"),@@ -104,15 +114,6 @@ export default {searchField.value.$el.querySelector("#search").focus();});- // Applies principal scope if we explicitly specify user in the query parameter- // or project is NOT present in the query parameter.- // In other words, if only project is present in the query parameter, then- // we do NOT apply principal scope, which is the case if we want to list all issues- // for a particular project.- const scopeByPrincipal = computed(() => {- return router.currentRoute.value.query.user || !state.selectedProjectId;- });-const project = computed(() => {if (state.selectedProjectId) {return store.getters["project/projectById"](state.selectedProjectId);@@ -127,9 +128,7 @@ export default {store.dispatch("issue/fetchIssueList", {issueStatusList: ["OPEN"],- userId: scopeByPrincipal.value- ? state.selectedPrincipalId- : undefined,+ userId: scopeByPrincipal ? state.selectedPrincipalId : undefined,projectId: state.selectedProjectId,}).then((issueList: Issue[]) => {@@ -141,9 +140,7 @@ export default {store.dispatch("issue/fetchIssueList", {issueStatusList: ["DONE", "CANCELED"],- userId: scopeByPrincipal.value- ? state.selectedPrincipalId- : undefined,+ userId: scopeByPrincipal ? state.selectedPrincipalId : undefined,projectId: state.selectedProjectId,}).then((issueList: Issue[]) => {