Skip to content

Commit

Permalink
fix(query-builder): Remove [me,my_teams,none] suggestion from assigned (
Browse files Browse the repository at this point in the history
#72915)

We want to keep this as a suggestion for the old search bar, but for the
new one we need to remove it because it handles multiple selection
differently.
  • Loading branch information
malwilley authored Jun 18, 2024
1 parent 28928e1 commit 81dc21b
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions static/app/utils/withIssueTags.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,16 @@ function withIssueTags<Props extends WithIssueTagsProps>(
.filter(team => !team.isMember)
.map(team => `#${team.slug}`);

const meAndMyTeamsNone = ['my_teams', 'none', '[me, my_teams, none]'];
const suggestedAssignees: string[] = ['me', ...meAndMyTeamsNone, ...userTeams];
const suggestedAssignees: string[] = [
'me',
'my_teams',
'none',
// New search builder only works with single value suggestions
...(props.organization.features.includes('issue-stream-search-query-builder')
? []
: ['[me, my_teams, none]']),
...userTeams,
];
const assigndValues: SearchGroup[] | string[] = [
{
title: t('Suggested Values'),
Expand Down Expand Up @@ -96,7 +104,7 @@ function withIssueTags<Props extends WithIssueTagsProps>(
values: assigndValues,
},
};
}, [teams, members, tags]);
}, [members, teams, props.organization.features, tags]);

// Listen to tag store updates and cleanup listener on unmount
useEffect(() => {
Expand Down

0 comments on commit 81dc21b

Please sign in to comment.