Fix missing milestone change system notes

What does this MR do and why?

Correctly create milestone events when an update contains a milestone and state change.

The root cause of this is related to #224610 (closed). We depend on ActiveRecord::Dirty to determine if a field was changed and if a system note is needed, but this can be cleared by the CloseService that does another #save on the model.

MR acceptance checklist

Please evaluate this MR against the MR acceptance checklist. It helps you analyze changes to reduce risks in quality, performance, reliability, security, and maintainability.

How to set up and validate locally

  1. In an issue / MR note, use the quick actions:

    /milestone <some milestone>
    /close
  2. Verify that a system note about the milestone change is added

Edited by Heinrich Lee Yu

Merge request reports

Loading