Guard validate_work_item_type_id with will_save_change check
What does this MR do and why?
Guards HasType#validate_work_item_type_id with will_save_change_to_work_item_type_id? so saves that do not touch work_item_type_id skip validation entirely.
Once type visibility controls are live, a work item can legitimately have a disabled type (the type was disabled after the work item was created). Without this guard, editing the title of such a work item would trigger the validation, fail, and make the work item uneditable.
Also inlines valid_work_item_type_id? (no external callers) and improves the error message.
References
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 (OOO - back on 2026-08-10)