Draft: Fix status filtering to exclude items mapped away by status mappings
What does this MR do and why?
Fix status filtering to exclude items mapped away by status mappings
When filtering work items by status, items were incorrectly included if they matched the filter criteria but would actually display a different status due to active status mappings.
Example scenario:
- Item has system_defined_status_id = 1 (system "to do")
- Custom status "to do" exists with converted_from_system_defined_status_identifier = 1
- Mapping exists: "to do" → "in progress" for tasks
- Item should NOT appear in "to do" filter results because it displays as "in progress"
Changes:
- Add exclusion logic in StatusFilter to remove items that would be mapped away
- Handle both custom statuses and system-defined statuses in mapping detection
- Preserve items that map TO the filtered status (existing behavior)
- Only exclude items that map FROM the filtered status to a different status
- Support time-constrained mappings in exclusion logic
The filter now correctly:
- Includes items that map TO the target status
- Includes items with direct status match when no mapping applies
- Excludes items that would be mapped AWAY from the target status
References
- Status filtering includes items that are mapped... (#573170 - closed)
- BE: Add mapping (#558275 - closed)
Screenshots or screen recordings
| Before | After |
|---|---|
How to set up and validate locally
MR acceptance checklist
Evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.
Edited by Marc Saleiko