Move task to a different process instance
User Story: As a user, I want to move (verschieben) a task to another process instance.
Phase 1 (backend )
- Moving is only permitted if no data field used in the task is used in another task or other block
- Content Items
- assignment to target workflow
- assignment to content item definition is removed (if available)
- assignment to task item remains (there is only one per the above mentioned restriction)
- Images should not be a problem (should be tested)
- status of the data fields; date and author of the last edit are retained
- assignment to the events is retained
- Task Item
- Remove assignment to task item definition (if available) - all other properties are retained
- Task
- Assignment to targt workflow
- Remove assignment to task definition (this removes the candidate assignee, for example)
- Status (also postponed date) remains
- move to the last position of the workflow (user can later move the task manually)
- title of the task remains (duplicates are allowed)
- Persons responsible and participants remain
- events and comments remain (note: "historical" comments are then displayed in the journal with the name of the new location - although they took place at the old location. This is OK - as they took place in the context of the task).
- assignment to a block (if available) is removed
- add a event to the task, that is was moved from workflow XY (with notification to the person responsible for the task, source process and target process - if it is not you)
- Update the status of the initial and target workflow
- both workflows must be re-indexed
- if a task ist the last remaining task of the initial workflow this workflow will be deleted
Phase 2 (frontend)
The Option "Aufgabe verschieben" will be availbale in the 3-point menu of the task. This option is available in each status of the task and the initial workflow.
A dialog is opend in which the use can select the target process. The user can select all processes the user is currently allowed to see (similar to the selction of a process in the referencing mechanism of the free text field).
Attention: The selection of a target process is disabled when the task can not be moved (due to the restriction, that all content item should be usd only in this task). In this case the use should read a error message like "Diese Aufgabe kann nicht verschoben werden, da ein oder mehrere Felder noch in anderen Aufgaben oder Blöcken genutzt werden." (If possible, a list of names of the affected content items is displayed).
Attention: If the task is the last task of the initial process, the dialog should inform the user, that the process will be deleted. By chosing a checkbox the user has to confirm that he wants to delete the workflow as well. (Moving this task is not possible without confirming the deletion of the initial workflow).
Once the user confirms the movement of the task ot the target workflow, the user is redirected to the the target workflow and the current task. The editor mode is enabled, so that the user can easily change the position of the task.
This features does not allow to change a task from a process to a single task without Vorlage.