diff options
Diffstat (limited to 'vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js')
-rw-r--r-- | vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js index 8a7d59a62..88caef29e 100644 --- a/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js +++ b/vid-app-common/src/main/webapp/app/vid/scripts/modals/new-change-management/new-change-management.controller.js @@ -634,16 +634,20 @@ }; vm.loadWorkFlows = function () { - // Should be corrected when VID-397 will be closed. At the moment there is a need - // to merge local and remote workflows not to broke current functionality. - return vm.loadLocalWorkFlows() - .then(vm.loadLocalWorkFlowsParameters) - .then(vm.loadRemoteWorkFlows) - .then(function () { - vm.workflows = vm.localWorkflows.concat(vm.remoteWorkflows.map(item => item.name)); - }).then(function () { - vm.loadRemoteWorkFlowsParameters(); - }); + if (featureFlags.isOn(COMPONENT.FEATURE_FLAGS.FLAG_HANDLE_SO_WORKFLOWS)) { + return vm.loadRemoteWorkFlows() + .then(function () { + vm.workflows = vm.remoteWorkflows.map(item => item.name); + }).then(function () { + vm.loadRemoteWorkFlowsParameters(); + }); + }else{ + return vm.loadLocalWorkFlows() + .then(vm.loadLocalWorkFlowsParameters) + .then(function () { + vm.workflows = vm.localWorkflows; + }) + } }; vm.loadLocalWorkFlows = function () { |