Browse Source

Global search - fix label not found

John R. Supplee 4 years ago
parent
commit
7b8d67de63
3 changed files with 5 additions and 1 deletions
  1. 3 0
      client/components/main/globalSearch.js
  2. 1 0
      i18n/en.i18n.json
  3. 1 1
      models/cards.js

+ 3 - 0
client/components/main/globalSearch.js

@@ -76,6 +76,9 @@ BlazeComponent.extendComponent({
     errors.notFound.lists.forEach(list => {
     errors.notFound.lists.forEach(list => {
       messages.push({ tag: 'list-title-not-found', value: list });
       messages.push({ tag: 'list-title-not-found', value: list });
     });
     });
+    errors.notFound.labels.forEach(label => {
+      messages.push({ tag: 'label-not-found', value: label });
+    });
     errors.notFound.users.forEach(user => {
     errors.notFound.users.forEach(user => {
       messages.push({ tag: 'user-username-not-found', value: user });
       messages.push({ tag: 'user-username-not-found', value: user });
     });
     });

+ 1 - 0
i18n/en.i18n.json

@@ -868,6 +868,7 @@
   "board-title-not-found": "Board '%s' not found.",
   "board-title-not-found": "Board '%s' not found.",
   "swimlane-title-not-found": "Swimlane '%s' not found.",
   "swimlane-title-not-found": "Swimlane '%s' not found.",
   "list-title-not-found": "List '%s' not found.",
   "list-title-not-found": "List '%s' not found.",
+  "label-not-found": "Label '%s' not found.",
   "user-username-not-found": "Username '%s' not found.",
   "user-username-not-found": "Username '%s' not found.",
   "globalSearch-title": "Search All Boards",
   "globalSearch-title": "Search All Boards",
   "no-cards-found": "No Cards Found",
   "no-cards-found": "No Cards Found",

+ 1 - 1
models/cards.js

@@ -1872,7 +1872,7 @@ Cards.globalSearch = queryParams => {
               });
               });
           });
           });
         } else {
         } else {
-          errors.notFound.labels.push({ tag: 'label', value: label });
+          errors.notFound.labels.push(label);
         }
         }
       }
       }