diff --git a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx index a68092407..63685d7e4 100644 --- a/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx +++ b/spiffworkflow-frontend/src/components/ProcessInstanceListTable.tsx @@ -206,7 +206,8 @@ export default function ProcessInstanceListTable({ const [showAdvancedOptions, setShowAdvancedOptions] = useState(false); - const [withOldestOpenTask, setWithOldestOpenTask] = useState(false); + const [withOldestOpenTask, setWithOldestOpenTask] = + useState(showActionsColumn); const [systemReport, setSystemReport] = useState(null); const [selectedUserGroup, setSelectedUserGroup] = useState( null @@ -436,6 +437,14 @@ export default function ProcessInstanceListTable({ }); } + // If the showActionColumn is set to true, we need to include the with_oldest_open_task in the query params + if (showActionsColumn) { + reportMetadataBodyToUse.filter_by.push({ + field_name: 'with_oldest_open_task', + field_value: true, + }); + } + if (filtersEnabled) { HttpService.makeCallToBackend({ path: `/user-groups/for-current-user`,