Browse Source

fix(issues): Show `none` as an autocomplete option (#69871)

Scott Cooper 10 months ago
parent
commit
a6a629f5ad
2 changed files with 5 additions and 5 deletions
  1. 3 3
      static/app/utils/withIssueTags.spec.tsx
  2. 2 2
      static/app/utils/withIssueTags.tsx

+ 3 - 3
static/app/utils/withIssueTags.spec.tsx

@@ -74,7 +74,7 @@ describe('withIssueTags HoC', function () {
     });
 
     expect(
-      screen.getByText(/assigned: me, my_teams, \[me, my_teams, none\]/)
+      screen.getByText(/assigned: me, my_teams, none, \[me, my_teams, none\]/)
     ).toBeInTheDocument();
 
     act(() => {
@@ -89,7 +89,7 @@ describe('withIssueTags HoC', function () {
 
     expect(
       screen.getByText(
-        /assigned: me, my_teams, \[me, my_teams, none\], #best-team-na, foo@example.com, joe@example.com/
+        /assigned: me, my_teams, none, \[me, my_teams, none\], #best-team-na, foo@example.com, joe@example.com/
       )
     ).toBeInTheDocument();
 
@@ -113,7 +113,7 @@ describe('withIssueTags HoC', function () {
     );
 
     expect(container).toHaveTextContent(
-      'assigned: me, my_teams, [me, my_teams, none], #best-team'
+      'assigned: me, my_teams, none, [me, my_teams, none], #best-team'
     );
     // Has the other teams/members
     expect(container).toHaveTextContent('foo@example.com, joe@example.com, #worst-team');

+ 2 - 2
static/app/utils/withIssueTags.tsx

@@ -61,8 +61,8 @@ function withIssueTags<Props extends WithIssueTagsProps>(
         .filter(team => !team.isMember)
         .map(team => `#${team.slug}`);
 
-      const meAndMyTeams = ['my_teams', '[me, my_teams, none]'];
-      const suggestedAssignees: string[] = ['me', ...meAndMyTeams, ...userTeams];
+      const meAndMyTeamsNone = ['my_teams', 'none', '[me, my_teams, none]'];
+      const suggestedAssignees: string[] = ['me', ...meAndMyTeamsNone, ...userTeams];
       const assigndValues: SearchGroup[] | string[] = [
         {
           title: t('Suggested Values'),