Skip to content

Backend generates work item URLs using IID instead of GID

Mario Celi requested to merge 372886-use-iid-work-items-path into master

What does this MR do and why?

After discussing several approaches on how to migrate from a work items route that uses a GID in the path to a route that uses a IID, we decided on this one #372886 (comment 1118529535)

We are generating URLs in the backend behind the use_iid_in_work_items_path feature flag. When this flag is enabled, the generated URLs will use the iid of a work item in the path and also add a query param ?iid_path=true to let the frontend know that the integer number at the end of the path is an IID and not a GID as it used to be

How to set up and validate locally

  1. Enable the future flag in rails console
    Feature.enable(:use_iid_in_work_items_path)
  2. Create a child task from an issue and then go to the issue list to find the new task. Clicking on the task should redirect to the new route. AS the frontend still can't handle the new route, you'll probably get a 404 (unless the IID of the task matches the GID of another work item you have access to).

This feature flag should not be enabled in any environment until the frontend implements their part

MR acceptance checklist

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

Related to #372886 (closed)

Edited by Mario Celi

Merge request reports