From 90ab56b93a8cf85440ed71e57429896645fd5dab Mon Sep 17 00:00:00 2001 From: burnettk Date: Fri, 25 Nov 2022 00:44:06 -0500 Subject: [PATCH] in completed tab, show display name, and filter by all stopped statuses rather than just complete --- .../routes/process_api_blueprint.py | 6 +++--- .../services/process_instance_report_service.py | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py index 97904dbaf..b28f83907 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/routes/process_api_blueprint.py @@ -857,7 +857,7 @@ def process_instance_list( if report_filter.initiated_by_me is True: process_instance_query = process_instance_query.filter( - ProcessInstanceModel.status == "complete" + ProcessInstanceModel.status.in_(["complete", "error", "terminated"]) # type: ignore ) process_instance_query = process_instance_query.filter_by( process_initiator=g.user @@ -866,7 +866,7 @@ def process_instance_list( # TODO: not sure if this is exactly what is wanted if report_filter.with_tasks_completed_by_me is True: process_instance_query = process_instance_query.filter( - ProcessInstanceModel.status == "complete" + ProcessInstanceModel.status.in_(["complete", "error", "terminated"]) # type: ignore ) process_instance_query = process_instance_query.join( SpiffStepDetailsModel, @@ -889,7 +889,7 @@ def process_instance_list( # TODO: not sure if this is exactly what is wanted if report_filter.with_tasks_completed_by_my_group is True: process_instance_query = process_instance_query.filter( - ProcessInstanceModel.status == "complete" + ProcessInstanceModel.status.in_(["complete", "error", "terminated"]) # type: ignore ) process_instance_query = process_instance_query.join( SpiffStepDetailsModel, diff --git a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py index 731abcdbd..e29ab46cc 100644 --- a/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py +++ b/spiffworkflow-backend/src/spiffworkflow_backend/services/process_instance_report_service.py @@ -88,8 +88,8 @@ class ProcessInstanceReportService: "columns": [ {"Header": "id", "accessor": "id"}, { - "Header": "process_model_identifier", - "accessor": "process_model_identifier", + "Header": "process_model_display_name", + "accessor": "process_model_display_name", }, {"Header": "start_in_seconds", "accessor": "start_in_seconds"}, {"Header": "end_in_seconds", "accessor": "end_in_seconds"}, @@ -101,8 +101,8 @@ class ProcessInstanceReportService: "columns": [ {"Header": "id", "accessor": "id"}, { - "Header": "process_model_identifier", - "accessor": "process_model_identifier", + "Header": "process_model_display_name", + "accessor": "process_model_display_name", }, {"Header": "start_in_seconds", "accessor": "start_in_seconds"}, {"Header": "end_in_seconds", "accessor": "end_in_seconds"}, @@ -116,8 +116,8 @@ class ProcessInstanceReportService: "columns": [ {"Header": "id", "accessor": "id"}, { - "Header": "process_model_identifier", - "accessor": "process_model_identifier", + "Header": "process_model_display_name", + "accessor": "process_model_display_name", }, {"Header": "start_in_seconds", "accessor": "start_in_seconds"}, {"Header": "end_in_seconds", "accessor": "end_in_seconds"},