Skip to content

Added a check for undefined type in work item merge function

Natalia Tepluhina requested to merge ntepluhina-fix-wi-refetch-2 into master

What does this MR do and why?

This MR prevents refetching a work item after real-time update. Previous MR added a merge function to stop the refetch but we didn't check for type field to exist. As a result, if existing widget has no type and incoming widget has no type, the cache was invalidated.

Screenshots or screen recordings

No visual changes

How to set up and validate locally

  1. Enable the work items feature flags

    Feature.enable(:work_items)
    Feature.enable(:work_items_mvc_2)
  2. Visit any work items such as http://127.0.0.1:3000/groups/flightjs/-/work_items/2

  3. Update the assignees, due date, or status.

  4. Check the Network tab: there should be no workItem query calls after workItemUpdate

MR acceptance checklist

This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.

Merge request reports