From a3b34c7829d52c2678b99e54fbc0867b7f2520ef Mon Sep 17 00:00:00 2001 From: Tim Otten Date: Sat, 14 Feb 2015 16:41:16 -0800 Subject: [PATCH] CRM-15857 - crmMetadata - Use 'sequential' so that options are returned in ordered format --- js/angular-crm-util.js | 6 +++--- partials/crmMailing/dialog/recipientOptions.html | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/js/angular-crm-util.js b/js/angular-crm-util.js index 2349fcff97..02708afe1b 100644 --- a/js/angular-crm-util.js +++ b/js/angular-crm-util.js @@ -87,13 +87,13 @@ deferreds[cacheKey].push(deferred); if (needFetch) { - crmApi(entity, 'getfields', {action: action, options: {get_options: 'all'}}) + crmApi(entity, 'getfields', {action: action, sequential: 1, options: {get_options: 'all'}}) .then( // on success: function(fields) { - cache[cacheKey] = fields.values; + cache[cacheKey] = _.indexBy(fields.values, 'name'); angular.forEach(deferreds[cacheKey], function(dfr) { - dfr.resolve(fields.values); + dfr.resolve(cache[cacheKey]); }); delete deferreds[cacheKey]; }, diff --git a/partials/crmMailing/dialog/recipientOptions.html b/partials/crmMailing/dialog/recipientOptions.html index 4454dd2f98..3deb9f769e 100644 --- a/partials/crmMailing/dialog/recipientOptions.html +++ b/partials/crmMailing/dialog/recipientOptions.html @@ -27,8 +27,8 @@ > - + @@ -40,8 +40,8 @@ ng-model="model.mailing.email_selection_method" required > - + -- 2.25.1