Browse Source

fix(ui): Show all matching Suggested Assignees (#25175)

Fix an issue where the Suggested Assignees on an Issue Details page was not displaying all Teams that matched the Issue Owners > Ownership rules.

FIXES WOR-760
Kelly Carino 3 years ago
parent
commit
51eb31544f

+ 1 - 1
src/sentry/static/sentry/app/components/group/suggestedOwners/suggestedAssignees.tsx

@@ -62,6 +62,6 @@ const Subheading = styled('small')`
 
 const Content = styled('div')`
   display: grid;
-  grid-gap: ${space(0.5)};
+  grid-gap: ${space(1)};
   grid-template-columns: repeat(auto-fill, 20px);
 `;

+ 5 - 1
src/sentry/static/sentry/app/components/group/suggestedOwners/suggestedOwners.tsx

@@ -112,7 +112,11 @@ class SuggestedOwners extends React.Component<Props, State> {
         rules: findMatchedRules(this.state.rules || [], owner),
       };
 
-      const existingIdx = owners.findIndex(o => o.actor.email === owner.email);
+      const existingIdx = owners.findIndex(o =>
+        this.props.committers.length === 0
+          ? o.actor === owner
+          : o.actor.email === owner.email
+      );
       if (existingIdx > -1) {
         owners[existingIdx] = {...normalizedOwner, ...owners[existingIdx]};
         return;