Include work item status change in the issue reopen webhook

What does this MR do and why?

When a work item is reopened (for example through the /reopen quick action), its work item status transitions back to an open status, but the workflowcomplete label is not cleared and the old label remains. This happens because the reopen webhook did not include the status change in its changes payload.

This MR fixes that by making Issues::ReopenService include the status change in the reopen webhook. It passes the item's status as old_associations to the existing hook call. This only happens when the work item has a current status record and the work_item_status feature is licensed, otherwise nothing changes.

This is the reopen counterpart to !259542 (merged) (#604636 (closed)), which fixed the close path the same way. The update path (status widget, Close and Reopen buttons) was already fixed in #604714 (closed) (!243503 (merged)). The /reopen quick action goes through the reopen webhook event, which that fix did not cover.

Scope: this MR only affects work items that already have a current status record. Backfilling the missing records is handled separately in #629280 (closed), it is not part of this MR.

Next steps

  • The triage-ops follow-up: the StatusLabelSyncProcessor reacts only to update and open events today. We will add the reopen events (issue.reopen, and work_item.reopen if that webhook fires) so the sync runs on reopen and clears or updates the workflowcomplete label. This mirrors the close follow-up (gitlab-org/quality/triage-ops!4414 (merged)).

References

How to set up and validate locally

Click to expand
  1. Create an issue and give it a status, then close it so it has a closed status (for example Complete) and a current status record.
  2. Set up a project webhook to capture issue hooks.
  3. Reopen the issue with the /reopen quick action.
  4. Observe that the reopen webhook payload now includes the status change under changes.status. Screenshot_2026-10-06_at_3.26.22_pm

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 Agnes Slota

Merge request reports

Loading
Loading