Skip to content

Limit number of issues that can be linked to an issue

Related to #423535 (closed)

What does this MR do and why?

Limit the number of issues that can be linked to an issue to 100. This limit is already present for linking epics and linking work items so for consistency we also want to apply it to issue links.

Screenshots or screen recordings

Screen_Recording_2023-09-19_at_13.53.49

How to set up and validate locally

  1. Create 3 issues in a project Issue 1, Issue 2 and Issue 3
  2. Visit Issue 1 and add Issue 2 as related
  3. Open app/models/concerns/issuable_link.rb and change the constant MAX_LINKS_COUNT to 2
  4. Reload the page and try to add Issue 3 as related. Verify that the item is not added and the error This issue would exceed the maximum number of linked issues. is returned.

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 Eugenia Grieff

Merge request reports

Loading