From b38203c1ed130c39b96216f499aa832e98599187 Mon Sep 17 00:00:00 2001 From: superbuggy Date: Thu, 31 Oct 2024 11:33:09 -0400 Subject: [PATCH 1/3] =?UTF-8?q?=F0=9F=90=9B=20Refresh=20affect=20trackers?= =?UTF-8?q?=20after=20filing=20trackers?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FlawTrackers/FlawTrackers.vue | 2 +- src/composables/useFlawModel.ts | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/src/components/FlawTrackers/FlawTrackers.vue b/src/components/FlawTrackers/FlawTrackers.vue index be4d5e18..01ca4771 100644 --- a/src/components/FlawTrackers/FlawTrackers.vue +++ b/src/components/FlawTrackers/FlawTrackers.vue @@ -24,7 +24,7 @@ const props = defineProps<{ const emit = defineEmits<{ 'affect:track-selected': [value: ZodAffectType[]]; 'affect:track-single': [value: ZodAffectType]; - 'affects:refresh': []; + 'affects-trackers:refresh': []; }>(); const settingsStore = useSettingsStore(); diff --git a/src/composables/useFlawModel.ts b/src/composables/useFlawModel.ts index f0e934eb..4e47fa06 100644 --- a/src/composables/useFlawModel.ts +++ b/src/composables/useFlawModel.ts @@ -1,4 +1,4 @@ -import { computed, ref } from 'vue'; +import { computed, ref, type Ref } from 'vue'; import { useRouter } from 'vue-router'; import { modifyPath } from 'ramda'; @@ -13,6 +13,7 @@ import { useNetworkQueue } from '@/composables/useNetworkQueue'; import { validateCvssVector } from '@/composables/useCvssCalculator'; import { + getFlaw, getFlawBugzillaLink, getFlawOsimLink, postFlaw, @@ -228,3 +229,15 @@ function flawErrors(flaw: ZodFlawType) { return mirroredFlaw; } + +export async function refreshFlawAffectTrackers(flaw: Ref) { + const freshFlaw = await getFlaw(flaw.value.uuid); + if (freshFlaw) { + flaw.value.affects.forEach((affect) => { + const freshAffect = freshFlaw.affects.find(freshAffect => freshAffect.uuid === affect.uuid); + if (freshAffect) { + affect.trackers = freshAffect.trackers; + } + }); + } +} From 6bb349328024d0c1a633e79d4e03a72d92c0bfab Mon Sep 17 00:00:00 2001 From: superbuggy Date: Fri, 1 Nov 2024 12:21:08 -0400 Subject: [PATCH 2/3] =?UTF-8?q?=F0=9F=93=9D=20Update=20changelog?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 236c071b..d376c7fe 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -45,6 +45,7 @@ ### Fixed * Corrected BZ link overlapping flaw promotion button (`OSIDB-3529`) +* Refresh trackers after filing new trackers (`OSIDB-3483`) ### Changed * Allow empty impact on flaw (`OSIDB-3596`) From 357dad7c1d20d53d6b83e2dacc1a1366562a5e1f Mon Sep 17 00:00:00 2001 From: superbuggy Date: Tue, 5 Nov 2024 09:40:32 -0500 Subject: [PATCH 3/3] =?UTF-8?q?=F0=9F=90=9B=20Fix=20typo?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/components/FlawTrackers/FlawTrackers.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/FlawTrackers/FlawTrackers.vue b/src/components/FlawTrackers/FlawTrackers.vue index 01ca4771..0d048f24 100644 --- a/src/components/FlawTrackers/FlawTrackers.vue +++ b/src/components/FlawTrackers/FlawTrackers.vue @@ -312,7 +312,7 @@ const { v-if="showTrackerManager" :relatedFlaws="relatedFlaws" :flaw="flaw" - @affects-trackers:refresh="emit('affects:refresh')" + @affects-trackers:refresh="emit('affects-trackers:refresh')" />