From bc231de96fdd0096445108b635ba55df8daaa7c7 Mon Sep 17 00:00:00 2001 From: Debora Crescenzo Date: Tue, 24 Mar 2026 12:40:57 +0000 Subject: [PATCH] MT#64804 CF toggle bugfix When toggling multiple CFs on/off in quick succession, the PATCH request returns inconsistent results, randomly multiplying resources. To avoid this, we now retrieve the updated mappings using cfLoadMappings() after the PATCH request and we disable the toggle while other csc-cf-mappings-full actions are performed This is a temporary fix while the backend team resolves the root cause, as the work is already in the pipeline. The fix has been applied only to the setMappingEnabled method, as it appears to be the only one affected due to the possibility of multiple consecutive calls. The fix has been applied only to the setMappingEnabled method, as it appears to be the only one affected due to the possibility of multiple consecutive calls. Change-Id: Ideb999e3871ea6b7f8a0d1a3b5979cd2ad88706e --- src/components/call-forwarding/CscCfGroupTitle.vue | 1 + src/store/call-forwarding/actions.js | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/src/components/call-forwarding/CscCfGroupTitle.vue b/src/components/call-forwarding/CscCfGroupTitle.vue index c31e4f02..0d0834ad 100644 --- a/src/components/call-forwarding/CscCfGroupTitle.vue +++ b/src/components/call-forwarding/CscCfGroupTitle.vue @@ -10,6 +10,7 @@ > diff --git a/src/store/call-forwarding/actions.js b/src/store/call-forwarding/actions.js index 566942ae..f247f1ac 100644 --- a/src/store/call-forwarding/actions.js +++ b/src/store/call-forwarding/actions.js @@ -13,6 +13,7 @@ import { cfLoadAnnouncements, cfLoadBNumberSets, cfLoadDestinationSets, + cfLoadMappings, cfLoadMappingsFull, cfLoadSourceSets, cfLoadTimeSets, @@ -157,13 +158,15 @@ export async function setMappingEnabled ({ dispatch, commit, state, rootGetters enabled: !mappingsByType[payload.index].enabled } - const updatedMappings = await cfUpdateMappingField({ + await cfUpdateMappingField({ resource: 'cfmappings', resourceId, fieldPath: payload.type, value: mappingsByType }) + const updatedMappings = await cfLoadMappings(resourceId) + commit('dataSucceeded', { mappings: updatedMappings }) } catch (e) { showGlobalError(e.message)