mirror of
https://github.com/sartography/spiff-arena.git
synced 2025-01-11 18:14:20 +00:00
updated system report names to match more closely the text used on the homepage w/ burnettk
This commit is contained in:
parent
4832256fc5
commit
0cc15d0da6
@ -76,7 +76,7 @@ class ProcessInstanceReportService:
|
|||||||
system_report_completed_instances_with_tasks_completed_by_me: ReportMetadata = {
|
system_report_completed_instances_with_tasks_completed_by_me: ReportMetadata = {
|
||||||
"columns": cls.builtin_column_options(),
|
"columns": cls.builtin_column_options(),
|
||||||
"filter_by": [
|
"filter_by": [
|
||||||
{"field_name": "with_tasks_completed_by_me", "field_value": True, "operator": "equals"},
|
{"field_name": "instances_with_tasks_completed_by_me", "field_value": True, "operator": "equals"},
|
||||||
{"field_name": "process_status", "field_value": terminal_status_values, "operator": "equals"},
|
{"field_name": "process_status", "field_value": terminal_status_values, "operator": "equals"},
|
||||||
],
|
],
|
||||||
"order_by": ["-start_in_seconds", "-id"],
|
"order_by": ["-start_in_seconds", "-id"],
|
||||||
@ -127,7 +127,7 @@ class ProcessInstanceReportService:
|
|||||||
{"Header": "Last Updated", "accessor": "task_updated_at_in_seconds", "filterable": False},
|
{"Header": "Last Updated", "accessor": "task_updated_at_in_seconds", "filterable": False},
|
||||||
],
|
],
|
||||||
"filter_by": [
|
"filter_by": [
|
||||||
{"field_name": "with_tasks_i_can_complete", "field_value": True, "operator": "equals"},
|
{"field_name": "instances_with_tasks_waiting_for_me", "field_value": True, "operator": "equals"},
|
||||||
{"field_name": "process_status", "field_value": active_status_values, "operator": "equals"},
|
{"field_name": "process_status", "field_value": active_status_values, "operator": "equals"},
|
||||||
{
|
{
|
||||||
"field_name": "with_oldest_open_task",
|
"field_name": "with_oldest_open_task",
|
||||||
@ -418,17 +418,17 @@ class ProcessInstanceReportService:
|
|||||||
process_initiator_id = initiator.id
|
process_initiator_id = initiator.id
|
||||||
process_instance_query = process_instance_query.filter_by(process_initiator_id=process_initiator_id)
|
process_instance_query = process_instance_query.filter_by(process_initiator_id=process_initiator_id)
|
||||||
|
|
||||||
with_tasks_completed_by_me = cls.get_filter_value(filters, "with_tasks_completed_by_me")
|
instances_with_tasks_completed_by_me = cls.get_filter_value(filters, "instances_with_tasks_completed_by_me")
|
||||||
with_tasks_i_can_complete = cls.get_filter_value(filters, "with_tasks_i_can_complete")
|
instances_with_tasks_waiting_for_me = cls.get_filter_value(filters, "instances_with_tasks_waiting_for_me")
|
||||||
user_group_identifier = cls.get_filter_value(filters, "user_group_identifier")
|
user_group_identifier = cls.get_filter_value(filters, "user_group_identifier")
|
||||||
|
|
||||||
# builtin only - for the for-me paths
|
# builtin only - for the for-me paths
|
||||||
with_relation_to_me = cls.get_filter_value(filters, "with_relation_to_me")
|
with_relation_to_me = cls.get_filter_value(filters, "with_relation_to_me")
|
||||||
|
|
||||||
if (
|
if (
|
||||||
not with_tasks_completed_by_me
|
not instances_with_tasks_completed_by_me
|
||||||
and not user_group_identifier
|
and not user_group_identifier
|
||||||
and not with_tasks_i_can_complete
|
and not instances_with_tasks_waiting_for_me
|
||||||
and with_relation_to_me is True
|
and with_relation_to_me is True
|
||||||
):
|
):
|
||||||
process_instance_query = process_instance_query.outerjoin(HumanTaskModel).outerjoin(
|
process_instance_query = process_instance_query.outerjoin(HumanTaskModel).outerjoin(
|
||||||
@ -445,16 +445,16 @@ class ProcessInstanceReportService:
|
|||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|
||||||
if with_tasks_completed_by_me is True and with_tasks_i_can_complete is True:
|
if instances_with_tasks_completed_by_me is True and instances_with_tasks_waiting_for_me is True:
|
||||||
raise ProcessInstanceReportMetadataInvalidError(
|
raise ProcessInstanceReportMetadataInvalidError(
|
||||||
"Cannot set both 'with_tasks_completed_by_me' and 'with_tasks_i_can_complete' to true. You must choose"
|
"Cannot set both 'instances_with_tasks_completed_by_me' and 'instances_with_tasks_waiting_for_me' to"
|
||||||
" one."
|
" true. You must choose one."
|
||||||
)
|
)
|
||||||
|
|
||||||
# ensure we only join with HumanTaskModel once
|
# ensure we only join with HumanTaskModel once
|
||||||
human_task_already_joined = False
|
human_task_already_joined = False
|
||||||
|
|
||||||
if with_tasks_completed_by_me is True:
|
if instances_with_tasks_completed_by_me is True:
|
||||||
process_instance_query = process_instance_query.filter(
|
process_instance_query = process_instance_query.filter(
|
||||||
ProcessInstanceModel.process_initiator_id != user.id
|
ProcessInstanceModel.process_initiator_id != user.id
|
||||||
)
|
)
|
||||||
@ -469,7 +469,7 @@ class ProcessInstanceReportService:
|
|||||||
|
|
||||||
# this excludes some tasks you can complete, because that's the way the requirements were described.
|
# this excludes some tasks you can complete, because that's the way the requirements were described.
|
||||||
# if it's assigned to one of your groups, it does not get returned by this query.
|
# if it's assigned to one of your groups, it does not get returned by this query.
|
||||||
if with_tasks_i_can_complete is True:
|
if instances_with_tasks_waiting_for_me is True:
|
||||||
process_instance_query = process_instance_query.filter(
|
process_instance_query = process_instance_query.filter(
|
||||||
ProcessInstanceModel.process_initiator_id != user.id
|
ProcessInstanceModel.process_initiator_id != user.id
|
||||||
)
|
)
|
||||||
|
@ -217,7 +217,10 @@ export default function ProcessInstanceListTable({
|
|||||||
);
|
);
|
||||||
const [userGroups, setUserGroups] = useState<string[]>([]);
|
const [userGroups, setUserGroups] = useState<string[]>([]);
|
||||||
const systemReportOptions: string[] = useMemo(() => {
|
const systemReportOptions: string[] = useMemo(() => {
|
||||||
return ['with_tasks_i_can_complete', 'with_tasks_completed_by_me'];
|
return [
|
||||||
|
'instances_with_tasks_waiting_for_me',
|
||||||
|
'instances_with_tasks_completed_by_me',
|
||||||
|
];
|
||||||
}, []);
|
}, []);
|
||||||
|
|
||||||
const [reportHash, setReportHash] = useState<string | null>(null);
|
const [reportHash, setReportHash] = useState<string | null>(null);
|
||||||
@ -1215,9 +1218,9 @@ export default function ProcessInstanceListTable({
|
|||||||
<Column md={4} lg={8} sm={2}>
|
<Column md={4} lg={8} sm={2}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
id="system-report-dropdown"
|
id="system-report-dropdown"
|
||||||
titleText="System Report"
|
titleText="System report"
|
||||||
items={['', ...systemReportOptions]}
|
items={['', ...systemReportOptions]}
|
||||||
itemToString={(item: any) => item}
|
itemToString={(item: any) => titleizeString(item)}
|
||||||
selectedItem={systemReport}
|
selectedItem={systemReport}
|
||||||
onChange={(value: any) => {
|
onChange={(value: any) => {
|
||||||
setSystemReport(value.selectedItem);
|
setSystemReport(value.selectedItem);
|
||||||
@ -1228,7 +1231,7 @@ export default function ProcessInstanceListTable({
|
|||||||
<Column md={4} lg={8} sm={2}>
|
<Column md={4} lg={8} sm={2}>
|
||||||
<Dropdown
|
<Dropdown
|
||||||
id="user-group-dropdown"
|
id="user-group-dropdown"
|
||||||
titleText="User Group"
|
titleText="Assigned user group"
|
||||||
items={['', ...userGroups]}
|
items={['', ...userGroups]}
|
||||||
itemToString={(item: any) => item}
|
itemToString={(item: any) => item}
|
||||||
selectedItem={selectedUserGroup}
|
selectedItem={selectedUserGroup}
|
||||||
@ -1264,6 +1267,7 @@ export default function ProcessInstanceListTable({
|
|||||||
onRequestSubmit={handleAdvancedOptionsClose}
|
onRequestSubmit={handleAdvancedOptionsClose}
|
||||||
onRequestClose={handleAdvancedOptionsClose}
|
onRequestClose={handleAdvancedOptionsClose}
|
||||||
hasScrollingContent
|
hasScrollingContent
|
||||||
|
size="lg"
|
||||||
>
|
>
|
||||||
{formElements}
|
{formElements}
|
||||||
</Modal>
|
</Modal>
|
||||||
@ -1338,7 +1342,7 @@ export default function ProcessInstanceListTable({
|
|||||||
return null;
|
return null;
|
||||||
}}
|
}}
|
||||||
placeholder="Start typing username"
|
placeholder="Start typing username"
|
||||||
titleText="Started By"
|
titleText="Started by"
|
||||||
selectedItem={processInitiatorSelection}
|
selectedItem={processInitiatorSelection}
|
||||||
/>
|
/>
|
||||||
);
|
);
|
||||||
@ -1347,7 +1351,7 @@ export default function ProcessInstanceListTable({
|
|||||||
<TextInput
|
<TextInput
|
||||||
id="process-instance-initiator-search"
|
id="process-instance-initiator-search"
|
||||||
placeholder="Enter username"
|
placeholder="Enter username"
|
||||||
labelText="Started By"
|
labelText="Started by"
|
||||||
invalid={processInitiatorNotFoundErrorText !== ''}
|
invalid={processInitiatorNotFoundErrorText !== ''}
|
||||||
invalidText={processInitiatorNotFoundErrorText}
|
invalidText={processInitiatorNotFoundErrorText}
|
||||||
onChange={(event: any) => {
|
onChange={(event: any) => {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user