This repository was archived by the owner on Mar 11, 2021. It is now read-only.

Description
As per discussion with @kwk and @jarifibrahim
Description
Implement the backend support for changing the type of a workitem.
Steps
-
To change workitemtype of a workitem, send a PATCH request to the workitem:
-
Check if the user is allowed to change the workitem. Only creator and space owner can change the type as of now.
-
Iterate over the fields of original workitem.
Case 1
Both original workitem and new workitem have the same field name and field type. In this case, the data is retained.
Case 2
New workitem has a field which original workitem does not have. In this case, the new workitem gets empty value (or default values; refer #2160).
Case 3
Original workitem has an extra field which the new workitem does not have. To preserve the data, we simply append the data to description field of workitem.
Audit Trail
Audit Trail should contain a record of change of work item type.