LP1825403: Do not Include Tag Owner in Tag
authorJason Boyer <jboyer@equinoxinitiative.org>
Tue, 22 Oct 2019 13:18:29 +0000 (09:18 -0400)
committerMike Rylander <mrylander@gmail.com>
Tue, 22 Oct 2019 13:32:55 +0000 (09:32 -0400)
Copy tags were accidentally having their owning
location shortname included in the tag values,
this patch allows the owner to be displayed but
not included in the value used.

Signed-off-by: Jason Boyer <jboyer@equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>

Open-ILS/src/templates/staff/cat/bucket/copy/t_apply_tags.tt2
Open-ILS/src/templates/staff/cat/volcopy/t_copy_tags.tt2
Open-ILS/web/js/ui/default/staff/cat/bucket/copy/app.js
Open-ILS/web/js/ui/default/staff/cat/volcopy/app.js

index e218ade..d60728d 100644 (file)
@@ -21,7 +21,7 @@
           <div class="form-group">
             <label for="tagLabel">[% l('Tag') %]</label>
             <input name="tabLabel" type="text" ng-model="selectedLabel" placeholder="[% l('Enter tag label...') %]"
-                uib-typeahead="tag for tag in getTags($viewValue)" typeahead-editable="false"
+                uib-typeahead="tag.value as tag.display for tag in getTags($viewValue)" typeahead-editable="false"
                 class="form-control" autocomplete="off"></input>
           </div>
           <button type="button" class="btn btn-sm btn-default" ng-click="addTag()">[% l('Add Tag') %]</button>
index 13194cb..25e5d96 100644 (file)
@@ -21,7 +21,7 @@
           <div class="form-group">
             <label for="tagLabel">[% l('Tag') %]</label>
             <input name="tabLabel" type="text" ng-model="selectedLabel" placeholder="[% l('Enter tag label...') %]"
-                uib-typeahead="tag for tag in getTags($viewValue)"
+                uib-typeahead="tag.value as tag.display for tag in getTags($viewValue)"
                 class="form-control" autocomplete="off"></input>
           </div>
           <button type="button" class="btn btn-sm btn-default" ng-click="addTag()">[% l('Add Tag') %]</button>
index e5cc7f4..bebb642 100644 (file)
@@ -863,7 +863,7 @@ function($scope,  $q , $routeParams , $timeout , $window , $uibModal , bucketSvc
                         { order_by : { 'acpt' : ['label'] } }, { atomic: true }
                     ).then(function(list) {
                         return list.map(function(item) {
-                            return item.label();
+                            return { value: item.label(), display: item.label() + " (" + egCore.org.get(item.owner()).shortname() + ")" };
                         });
                     });
                 }
index 9b5b57e..20b819e 100644 (file)
@@ -2198,7 +2198,7 @@ function($scope , $q , $window , $routeParams , $location , $timeout , egCore ,
                         { order_by : { 'acpt' : ['label'] } }, { atomic: true }
                     ).then(function(list) {
                         return list.map(function(item) {
-                            return item.label() + " (" + egCore.org.get(item.owner()).shortname() + ")";
+                            return { value: item.label(), display: item.label() + " (" + egCore.org.get(item.owner()).shortname() + ")" };
                         });
                     });
                 }