Handle items without current_status by mapping
Problem
Currently, mappings don't work for work items without a status assigned. This affects all "old" pre-18.2 items that haven't received a status via setting the status or closing/reopening the item.
When a status that was previously a default is deleted or when a work item type is attached to another lifecycle with defined replacements for a former default status, the system behaves inconsistently:
- Items with a status record will show the correct mapped status
- Items without a status record will incorrectly show the new default status
This occurs because we cannot determine if the old status of the mapping used to be a default status before, as we don't have this data available.
Solution
We need to enhance the mapping system to recognize when an old status was a default status. This requires:
- Adding a new column to the database
- Adjusting the mutations
- Updating filtering and mapping resolution logic
Impact
This is a one-way door issue that needs to be addressed in the 18.5 release. Without this fix, there's no way to provide the missing information via a data migration later.
References
Based on this thread !206354 (comment 2781241923) on this MR !206354 (merged)