diff --git a/src/components/BulkEditActionMenu/BulkEditActionMenu.js b/src/components/BulkEditActionMenu/BulkEditActionMenu.js
index cfbedd08..55585cca 100644
--- a/src/components/BulkEditActionMenu/BulkEditActionMenu.js
+++ b/src/components/BulkEditActionMenu/BulkEditActionMenu.js
@@ -76,9 +76,9 @@ const BulkEditActionMenu = ({
const isStartBulkInAppActive =
hasEditPerm
&& isInitialStep
- && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status);
+ && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES, JOB_STATUSES.REVIEWED_NO_MARC_RECORDS].includes(bulkDetails?.status);
const isStartMarkActive = (isStartBulkInAppActive || hasInstanceAndMarcEditPerm || hasInventoryAndMarcEditPerm) && currentRecordType === CAPABILITIES.INSTANCE && isInitialStep
- && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status);
+ && [JOB_STATUSES.DATA_MODIFICATION, JOB_STATUSES.REVIEW_CHANGES, JOB_STATUSES.REVIEWED_NO_MARC_RECORDS].includes(bulkDetails?.status);
const isStartManualButtonVisible = isStartBulkCsvActive && isInitialStep && countOfRecords > 0 && criteria !== CRITERIA.QUERY && !isESC;
diff --git a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js
index acf04be5..5afcd61c 100644
--- a/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js
+++ b/src/components/BulkEditPane/BulkEditListResult/BulkEditInAppPreviewModal/BulkEditPreviewModalList.js
@@ -53,7 +53,7 @@ export const BulkEditPreviewModalList = ({
});
const visibleColumnKeys = getVisibleColumnsKeys(visibleColumns);
- const enabled = bulkDetails?.status === JOB_STATUSES.REVIEW_CHANGES;
+ const enabled = [JOB_STATUSES.REVIEWED_NO_MARC_RECORDS, JOB_STATUSES.REVIEW_CHANGES].includes(bulkDetails?.status);
const {
contentData,
@@ -81,7 +81,7 @@ export const BulkEditPreviewModalList = ({
if (!contentData) return ;
const renderMessageBanner = () => {
- if (!bulkDetails?.processedNumOfRecords && currentRecordType === CAPABILITIES.INSTANCE) {
+ if (bulkDetails?.status === JOB_STATUSES.REVIEWED_NO_MARC_RECORDS) {
return (
diff --git a/src/constants/core.js b/src/constants/core.js
index 8bf67bda..d25570b0 100644
--- a/src/constants/core.js
+++ b/src/constants/core.js
@@ -50,6 +50,7 @@ export const JOB_STATUSES = {
SAVING_RECORDS_LOCALLY: 'SAVING_RECORDS_LOCALLY',
DATA_MODIFICATION: 'DATA_MODIFICATION',
REVIEW_CHANGES: 'REVIEW_CHANGES',
+ REVIEWED_NO_MARC_RECORDS: 'REVIEWED_NO_MARC_RECORDS',
APPLY_CHANGES: 'APPLY_CHANGES',
SUSPENDED: 'SUSPENDED',
COMPLETED: 'COMPLETED',
diff --git a/src/utils/pollForStatus.js b/src/utils/pollForStatus.js
index 39599d34..b7778724 100644
--- a/src/utils/pollForStatus.js
+++ b/src/utils/pollForStatus.js
@@ -7,7 +7,11 @@ export const pollForStatus = (ky, id) => {
try {
const data = await ky.get(`bulk-operations/${id}`).json();
if (data.status !== JOB_STATUSES.DATA_MODIFICATION_IN_PROGRESS) {
- clearInterval(intervalId); resolve(data.status);
+ clearInterval(intervalId);
+ resolve(data.status);
+ } else if (data.status === JOB_STATUSES.FAILED) {
+ clearInterval(intervalId);
+ reject(data.errorMessage);
}
} catch (error) { clearInterval(intervalId); reject(error); }
}, interval);
diff --git a/translations/ui-bulk-edit/en.json b/translations/ui-bulk-edit/en.json
index 6e018c0c..e1f8d9f2 100644
--- a/translations/ui-bulk-edit/en.json
+++ b/translations/ui-bulk-edit/en.json
@@ -431,7 +431,7 @@
"actionMenu.placeholder": "Search column name",
"previewModal.message": "{count, number} records will be changed if the Commit changes button is clicked. You may choose Download preview to review all changes prior to saving.",
- "previewModal.message.empty.marc": "All instances have source FOLIO. Use “Instances and Administrative data” option for bulk edit.",
+ "previewModal.message.empty.marc": "All instances have source FOLIO. Use “Instances and Administrative data” option for bulk edit.",
"previewModal.previewToBeChanged": "Preview of records to be changed",
"previewModal.keepEditing": "Keep editing",
"previewModal.downloadPreview": "Download preview",