GraphQL IssueType returns work item path if task
What does this MR do and why?
Issue type has a webUrl and webPath fields. These fields will now return the work items url if the presented issue is of type task
Related to #356627 (closed)
How to set up and validate locally
- Run
bundle exec rails console
- Run
Feature.enable(:work_items)
- In the console make sure to fetch the IID of an issue with
issue.update(issue_type: 'task')
- Execute a GraphQL query like
{
project(fullPath: "gitlab-org/plan-stage/test-project") {
issue(iid: "74") {
id
webUrl
webPath
}
}
}
You should get a path like "http://localhost/group1/project1/-/work_items/49"
.
If you disable the feature flag or the fetched issue is not of issue_type task, you should get an issue path like
https://gitlab.com/gitlab-org/plan-stage/test-project/-/issues/1"
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.