From a6290f6082851b8c4188b3e4e24403674a4bd9c2 Mon Sep 17 00:00:00 2001 From: Robert Axelsen Date: Tue, 5 Sep 2017 18:36:21 +0200 Subject: [PATCH] TT#20651 Set type to cft for new if empty online Change-Id: I7dfccb6e3b4aedd3d60aa70cb0229036d5af7f36 --- .../view/pages/callforward/CallForwardController.js | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/classic/src/view/pages/callforward/CallForwardController.js b/classic/src/view/pages/callforward/CallForwardController.js index 2a75b479..8a2f636e 100644 --- a/classic/src/view/pages/callforward/CallForwardController.js +++ b/classic/src/view/pages/callforward/CallForwardController.js @@ -421,10 +421,14 @@ Ext.define('NgcpCsc.view.pages.callforward.CallForwardController', { }; }, - getTypeFromTypeName: function(type) { + getTypeFromTypeName: function(type, store) { switch (type) { case 'Online': - return 'cfu'; + if (store.last()) { + return 'cfu'; + } else { + return 'cft'; + }; break; case 'Busy': return 'cfb'; @@ -1099,7 +1103,7 @@ Ext.define('NgcpCsc.view.pages.callforward.CallForwardController', { var newTypeName = storeIdSplit[2].slice(11); var newSourceset = activeTab ? vm.get('sourceset-' + activeTab._sourcesetListId + "-title") : null; var newTimeset = this.getTimeSetFromTimeSource(newTimesetName); - var newType = this.getTypeFromTypeName(newTypeName); + var newType = this.getTypeFromTypeName(newTypeName, store); var newDestination = destination === 'Voicemail' ? 'voicebox' : destination.toLowerCase(); // TODO: Sets default timeout to 10 for non-number types, as can not be // set to null. Not sure if this has any implication, so needs to be