diff options
Diffstat (limited to 'app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6')
-rw-r--r-- | app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6 | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6 b/app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6 index e46373024b6..e6b53cd4b55 100644 --- a/app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6 +++ b/app/assets/javascripts/filtered_search/filtered_search_token_keys.js.es6 @@ -21,6 +21,15 @@ symbol: '~', }]; + const alternativeTokenKeys = [{ + key: 'label', + type: 'string', + param: 'name', + symbol: '~', + }]; + + const tokenKeysWithAlternative = tokenKeys.concat(alternativeTokenKeys); + const conditions = [{ url: 'assignee_id=0', tokenKey: 'assignee', @@ -44,6 +53,10 @@ return tokenKeys; } + static getAlternatives() { + return alternativeTokenKeys; + } + static getConditions() { return conditions; } @@ -57,7 +70,7 @@ } static searchByKeyParam(keyParam) { - return tokenKeys.find((tokenKey) => { + return tokenKeysWithAlternative.find((tokenKey) => { let tokenKeyParam = tokenKey.key; if (tokenKey.param) { |