Skip to content

Change fetch policy for work item detail

Deepika Guliani requested to merge dg-cache-network-work-item-detail into master

What does this MR do and why?

Use cache-and-network type policy to ensure updates in work items when modal is closed and subscriptions are not active.

Current production behavior before this MR

  1. Open an issue where work items are linked, either in "linked" section or "tasks" section
  2. Click on any WI link , see that even before opening , on hover the WI detail is already pre-fetched
  3. Now close the modal
  4. Open it again , you can see that there is no fresh graphql call to fetch work item details since it is cached

To check why we are doing what we are doing

  1. Open an issue where work items are linked, either in "linked" section or "tasks" section
  2. Open the WI in modal ( WI details are already fetched now and cached), now close the modal
  3. Now , Open the WI in full view in a new adjacent tab
  4. now you have 2 tabs , one tab having the issue which has related tasks( with the modal closed) and the adjacent tab being the WI full view
  5. From the WI full view , now change the weight/ or any other widget
  6. Come back to the issue full view and open the WI in the modal, see that you cannot view the latest changes made to the modal since the details are cached

What we are trying to do in this MR is changed the fetchPolicy of work item detail, so that everytime some changes are made and the subscriptions are not active ( since the modal is closed ) the new changes are reflected

Before After
Screen_Recording_2023-04-19_at_12.31.50_PM Screen_Recording_2023-04-19_at_12.30.24_PM

Screenshots or screen recordings

Screenshots are required for UI changes, and strongly recommended for all other merge requests.

How to set up and validate locally

Expected changes in prod after this MR

  1. Open an issue where work items are linked, either in "linked" section or "tasks" section
  2. Open the WI in modal ( WI details are already fetched now and cached), now close the modal
  3. Now , Open the WI in full view in a new adjacent tab
  4. now you have 2 tabs , one tab having the issue which has related tasks( with the modal closed) and the adjacent tab being the WI full view
  5. From the WI full view , now change the weight/ or any other widget
  6. Come back to the issue full view and open the WI in the modal, **see that you can the latest changes in the WI **

MR acceptance checklist

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

Edited by Deepika Guliani

Merge request reports

Loading