expose group and model for tasks
This commit is contained in:
parent
6d6e0e7efd
commit
8bcf3d08b5
|
@ -64,5 +64,9 @@ class ActiveTaskModel(SpiffworkflowBaseDBModel):
|
|||
)
|
||||
if hasattr(task, "process_model_display_name"):
|
||||
new_task.process_model_display_name = task.process_model_display_name
|
||||
if hasattr(task, "process_group_identifier"):
|
||||
new_task.process_group_identifier = task.process_group_identifier
|
||||
if hasattr(task, "process_model_identifier"):
|
||||
new_task.process_model_identifier = task.process_model_identifier
|
||||
|
||||
return new_task
|
||||
|
|
|
@ -112,6 +112,8 @@ class Task:
|
|||
properties: Union[dict, None] = None,
|
||||
process_instance_id: Union[int, None] = None,
|
||||
process_model_display_name: Union[str, None] = None,
|
||||
process_group_identifier: Union[str, None] = None,
|
||||
process_model_identifier: Union[str, None] = None,
|
||||
form_schema: Union[str, None] = None,
|
||||
form_ui_schema: Union[str, None] = None,
|
||||
parent: Optional[str] = None,
|
||||
|
@ -132,6 +134,8 @@ class Task:
|
|||
self.data = {}
|
||||
|
||||
self.process_instance_id = process_instance_id
|
||||
self.process_group_identifier = process_group_identifier
|
||||
self.process_model_identifier = process_model_identifier
|
||||
self.process_model_display_name = process_model_display_name
|
||||
self.form_schema = form_schema
|
||||
self.form_ui_schema = form_ui_schema
|
||||
|
@ -175,6 +179,8 @@ class Task:
|
|||
"properties": self.properties,
|
||||
"process_instance_id": self.process_instance_id,
|
||||
"process_model_display_name": self.process_model_display_name,
|
||||
"process_group_identifier": self.process_group_identifier,
|
||||
"process_model_identifier": self.process_model_identifier,
|
||||
"form_schema": self.form_schema,
|
||||
"form_ui_schema": self.form_ui_schema,
|
||||
"parent": self.parent,
|
||||
|
|
|
@ -789,6 +789,7 @@ def task_list_my_tasks(page: int = 1, per_page: int = 100) -> flask.wrappers.Res
|
|||
# just need this add_columns to add the process_model_identifier. Then add everything back that was removed.
|
||||
.add_columns(
|
||||
ProcessInstanceModel.process_model_identifier,
|
||||
ProcessInstanceModel.process_group_identifier,
|
||||
ActiveTaskModel.task_data,
|
||||
ActiveTaskModel.task_name,
|
||||
ActiveTaskModel.task_title,
|
||||
|
|
Loading…
Reference in New Issue