Commit e78734bd authored by Eulyeon Ko's avatar Eulyeon Ko

Use edge conditions to process supportbot token

parent 88ab8a14
......@@ -649,10 +649,7 @@ export default class FilteredSearchManager {
hasFilteredSearch = true;
const canEdit = this.canEdit && this.canEdit(key, sanitizedValue);
const { uppercaseTokenName, capitalizeTokenValue } = match;
const isSupportBot = keyParam === 'author_username' && value === 'support-bot';
const operator = isSupportBot
? '='
: FilteredSearchVisualTokens.getOperatorToken(sanitizedValue);
const operator = FilteredSearchVisualTokens.getOperatorToken(sanitizedValue);
const sanitizedToken = FilteredSearchVisualTokens.getValueToken(sanitizedValue);
FilteredSearchVisualTokens.addFilterVisualToken(
key,
......
......@@ -85,6 +85,11 @@ export const conditions = flattenDeep(
tokenKey: 'assignee',
value: __('Any'),
},
{
url: 'author_username=support-bot',
tokenKey: 'author',
value: 'support-bot',
},
{
url: 'milestone_title=None',
tokenKey: 'milestone',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment