Skip to content

Commit

Permalink
fix(quick_list_widget):workflow-state-not-showing (frappe#27596)
Browse files Browse the repository at this point in the history
* fix(quick_list_widget):workflow-state-not-showing

when a document has workflow state, it should show workflow_status. Instead it doesn't.

existing code put a validation if status exist, but a document can have a workflow_state without a "status" field.

the correct approach is to separate the logic.

* fix(quick_list_widget):follow-suggestioin-to-remove-unnecessary-validation

Co-authored-by: Akhil Narang <[email protected]>

---------

Co-authored-by: Akhil Narang <[email protected]>
  • Loading branch information
foolishdino and akhilnarang authored Sep 10, 2024
1 parent 425d409 commit 3fe34b2
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions frappe/public/js/frappe/widgets/quick_list_widget.js
Original file line number Diff line number Diff line change
Expand Up @@ -197,12 +197,10 @@ export default class QuickListWidget extends Widget {
if (this.has_status_field) {
fields.push("status");
fields.push("docstatus");

// add workflow state field if workflow exist & is active
let workflow_fieldname = frappe.workflow.get_state_fieldname(this.document_type);
workflow_fieldname && fields.push(workflow_fieldname);
}

// add workflow state field if workflow exist & is active
let workflow_fieldname = frappe.workflow.get_state_fieldname(this.document_type);
workflow_fieldname && fields.push(workflow_fieldname);
fields.push("modified");

let quick_list_filter = frappe.utils.process_filter_expression(this.quick_list_filter);
Expand Down

0 comments on commit 3fe34b2

Please sign in to comment.