From efc303e2f14eb79a5b5898a6bf6c5d017e0b76d5 Mon Sep 17 00:00:00 2001 From: Jean-Roch Maitre Date: Fri, 8 Jan 2016 15:48:49 +0100 Subject: [PATCH] UI-1902: now properly list advanced callflows with their numbers if they don' have a name assigned --- submodules/strategy/strategy.js | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/submodules/strategy/strategy.js b/submodules/strategy/strategy.js index 06288a57..ea22b3d4 100644 --- a/submodules/strategy/strategy.js +++ b/submodules/strategy/strategy.js @@ -2179,9 +2179,20 @@ define(function(require){ groupName: self.i18n.active().strategy.callEntities[key], groupType: key, entities: $.map(value, function(entity) { + var name = entity.name; + + if(!name) { + if(entity.hasOwnProperty('first_name')) { + name = entity.first_name + ' ' + entity.last_name; + } + else if (entity.hasOwnProperty('numbers')) { + name = entity.numbers.toString(); + } + } + return { id: entity.id, - name: entity.name || (entity.first_name + ' ' + entity.last_name), + name: name, module: entity.module || key }; })