CRM-16277 - Sort groups and mailings alphabetically in the recipients drop-downs.
authorDave Greenberg <dave@civicrm.org>
Fri, 17 Apr 2015 00:53:45 +0000 (17:53 -0700)
committerDave Greenberg <dave@civicrm.org>
Fri, 17 Apr 2015 00:53:45 +0000 (17:53 -0700)
----------------------------------------
* CRM-16277: "DB Error: unknown error" in CiviMail upon adding recipient group
  https://issues.civicrm.org/jira/browse/CRM-16277

ang/crmMailing/Recipients.html

index 9d84e93931bdc9c89aee9b36c77ddf82149363ca..5fb611731f1ce2a4119fb02e460607e4308aa98a 100644 (file)
@@ -6,15 +6,15 @@ Directive: crmMailingRecipients
     <option ng-repeat="grp in mandatoryGroups" value="{{grp.id}} civicrm_group include">{{ts('Search Results')}}</option>
   </optgroup>
   <optgroup label="{{ts('Include Group')}}">
-    <option ng-repeat="grp in groups" value="{{grp.id}} civicrm_group include">{{grp.title}}</option>
+    <option ng-repeat="grp in groups|orderBy:'title'" value="{{grp.id}} civicrm_group include">{{grp.title}}</option>
   </optgroup>
   <optgroup label="{{ts('Exclude Group')}}">
-    <option ng-repeat="grp in groups" value="{{grp.id}} civicrm_group exclude">{{grp.title}}</option>
+    <option ng-repeat="grp in groups|orderBy:'title'" value="{{grp.id}} civicrm_group exclude">{{grp.title}}</option>
   </optgroup>
   <optgroup label="{{ts('Include Past Recipients From')}}">
-    <option ng-repeat="ml in mailings" value="{{ml.id}} civicrm_mailing include">{{ml.name}} ({{parseDate(ml.scheduled_date) | date:'mediumDate'}})</option>
+    <option ng-repeat="ml in mailings|orderBy:'name'" value="{{ml.id}} civicrm_mailing include">{{ml.name}} ({{parseDate(ml.scheduled_date) | date:'mediumDate'}})</option>
   </optgroup>
   <optgroup label="{{ts('Exclude Past Recipients From')}}">
-    <option ng-repeat="ml in mailings" value="{{ml.id}} civicrm_mailing exclude">{{ml.name}} ({{parseDate(ml.scheduled_date) | date:'mediumDate'}})</option>
+    <option ng-repeat="ml in mailings|orderBy:'name'" value="{{ml.id}} civicrm_mailing exclude">{{ml.name}} ({{parseDate(ml.scheduled_date) | date:'mediumDate'}})</option>
   </optgroup>
 </select>