Browse Source

fix(escalating-issues): Fix label for bulk actions (#63451)

Snigdha Sharma 1 year ago
parent
commit
1d06193c5b

+ 2 - 2
static/app/views/issueList/actions/actionSet.tsx

@@ -253,9 +253,9 @@ function ActionSet({
       >
         <ArchiveActions
           onUpdate={onUpdate}
-          shouldConfirm={onShouldConfirm(ConfirmAction.IGNORE)}
+          shouldConfirm={onShouldConfirm(ConfirmAction.ARCHIVE)}
           confirmMessage={() =>
-            confirm({action: ConfirmAction.IGNORE, canBeUndone: true})
+            confirm({action: ConfirmAction.ARCHIVE, canBeUndone: true})
           }
           confirmLabel={label('archive')}
           disabled={ignoreDisabled}

+ 1 - 1
static/app/views/issueList/actions/index.tsx

@@ -311,7 +311,7 @@ function shouldConfirm(
   switch (action) {
     case ConfirmAction.RESOLVE:
     case ConfirmAction.UNRESOLVE:
-    case ConfirmAction.IGNORE:
+    case ConfirmAction.ARCHIVE:
     case ConfirmAction.UNBOOKMARK: {
       return pageSelected && selectedIdsSet.size > 1;
     }

+ 3 - 4
static/app/views/issueList/actions/utils.tsx

@@ -14,7 +14,7 @@ export const BULK_LIMIT_STR = BULK_LIMIT.toLocaleString();
 export enum ConfirmAction {
   RESOLVE = 'resolve',
   UNRESOLVE = 'unresolve',
-  IGNORE = 'ignore',
+  ARCHIVE = 'archive',
   BOOKMARK = 'bookmark',
   UNBOOKMARK = 'unbookmark',
   MERGE = 'merge',
@@ -79,16 +79,15 @@ export function getConfirm({
     canBeUndone: boolean;
     append?: string;
   }) {
-    const actionText = action === ConfirmAction.IGNORE && t('archive');
     const question = allInQuerySelected
-      ? getBulkConfirmMessage(`${actionText}${append}`, queryCount)
+      ? getBulkConfirmMessage(`${action}${append}`, queryCount)
       : tn(
           // Use sprintf argument swapping since the number value must come
           // first. See https://github.com/alexei/sprintf.js#argument-swapping
           `Are you sure you want to %2$s this %s issue%3$s?`,
           `Are you sure you want to %2$s these %s issues%3$s?`,
           numIssues,
-          actionText,
+          action,
           append
         );