• Stan Hu's avatar
    Fix resolve WIP clearing merge request area · 229e126c
    Stan Hu authored
    When we split the merge request widget into cached and non-cached
    serializers in
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/15045, some merge
    request endpoints (e.g. `/remove_wip`, `/cancel_auto_merge`) weren't
    adapted to ensure that all the data was returned. As a result, the
    frontend would set its merge request state to the partial data it did
    have, but then it would clear out data that it didn't have (e.g. CI
    pipeline).
    
    When a user clicked on the `Resolve WIP Status` or `Cancel automatic
    merge` button, this would cause certain elements (e.g. CI pipeline
    status, merge area) to disappear until the next refresh occurred.
    
    We worked around the problem in the MWPS refresh case on the frontend in
    https://gitlab.com/gitlab-org/gitlab/-/merge_requests/26232 by forcing a
    refresh, but that didn't fix the "Resolve Work in Progress" case. This
    fix combines both the cached and non-cached data to ensure the response
    data contains all the information necessary for the frontend.
    
    Closes https://gitlab.com/gitlab-org/gitlab/-/issues/214750
    229e126c
user_resolves_wip_mr_spec.rb 1.67 KB