Fix work item url in work item linked items widget
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
- In rails console enable the flags
Feature.enable(:okrs_mvc) Feature.enable(:linked_work_items)
- Visit project issues page such as
http://127.0.0.1:3000/flightjs/flight/-/issues/
- Create a new Objective under New issue split button
- Go to Objective detail page
- In the Linked Items widget, add an issue from a different project
- Open the related issue in a new tab
- 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.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Coung Ngo