diff --git a/frappe/public/js/workflow_builder/store.js b/frappe/public/js/workflow_builder/store.js
index e955077192..e654014415 100644
--- a/frappe/public/js/workflow_builder/store.js
+++ b/frappe/public/js/workflow_builder/store.js
@@ -155,7 +155,7 @@ export const useStore = defineStore("workflow-builder-store", () => {
let affected_states = [];
workflow.value.elements.forEach((el) => {
if (el.type === "state" && el.data.doc_status && el.data.doc_status !== "Draft") {
- affected_states.push(el.data.state || __("No Label State"));
+ affected_states.push(el.data.state);
el.data.doc_status = "Draft";
}
});
@@ -164,8 +164,8 @@ export const useStore = defineStore("workflow-builder-store", () => {
frappe.msgprint({
title: __("Doc Status Reset"),
message: __(
- "The Doc Status for the following states has been reset to Draft because the {0} is not submittable: {1}",
- [workflow_doc.value.document_type, affected_states.join(", ")]
+ "The Doc Status for all states has been reset to Draft because {0} is not submittable",
+ [workflow_doc.value.document_type]
),
indicator: "orange",
});
diff --git a/frappe/workflow/doctype/workflow/workflow.js b/frappe/workflow/doctype/workflow/workflow.js
index be8d8b444a..05f99ce9d9 100644
--- a/frappe/workflow/doctype/workflow/workflow.js
+++ b/frappe/workflow/doctype/workflow/workflow.js
@@ -131,7 +131,7 @@ frappe.ui.form.on("Workflow", {
let affected_states = [];
frm.doc.states.forEach((row) => {
if (parseInt(row.doc_status || 0) !== 0) {
- affected_states.push(row.state || __("No Label State"));
+ affected_states.push(row.state);
row.doc_status = "0";
}
});
@@ -140,8 +140,8 @@ frappe.ui.form.on("Workflow", {
frappe.msgprint({
title: __("Doc Status Reset"),
message: __(
- "The Doc Status for the following states has been reset to Draft because the {0} is not submittable: {1}",
- [frm.doc.document_type, affected_states.join(", ")]
+ "The Doc Status for all states has been reset to 0 because {0} is not submittable",
+ [frm.doc.document_type]
),
indicator: "orange",
});