Skip to content

Fix work item url in work item linked items widget

Coung Ngo requested to merge cngo-fix-work-item-linked-items-url into master

What does this MR do and why?

Fix work item url in work item linked items widget

Fix the href to use the work item's url instead of constructing the url from the browser url which assumes that the child item is in the same project (we can add a linked item from a different project)

Behind feature flag okrs_mvc and linked_work_items

Clicking a related work item to open it in a modal shows an error if it is part of a different project. This will be fixed in a following MR

Screenshots or screen recordings

Before After
Screen_Recording_2023-10-11_at_2.22.18_pm Screen_Recording_2023-10-11_at_2.31.21_pm

How to set up and validate locally

  1. In rails console enable the flags
    Feature.enable(:okrs_mvc)
    Feature.enable(:linked_work_items)
  2. Visit project issues page such as http://127.0.0.1:3000/flightjs/flight/-/issues/
  3. Create a new Objective under New issue split button
  4. Go to Objective detail page
  5. In the Linked Items widget, add an issue from a different project
  6. Open the related issue in a new tab
  7. Confirm the url route is the correct project

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 Coung Ngo

Merge request reports