On standalone vulnerability page, don't allow created issue to be removed from related issues list, and remove Created Issue block
On the standalone vulnerability page, it's currently possible to unlink the issue created specifically for the vulnerability, from the related issues list:
We need to prevent the issue from being removed by changing the remove icon to a lock icon, stop it from being clickable, and display a tooltip for the reason why it can't be removed. Please see designs.
We also need to remove the Created Issues block:
![]() |
Details
Currently, the RelatedIssuableItem
has a canRemove
prop that shows a button hard-coded to show the Remove icon with a "Remove" tooltip. The canRemove
prop is passed from the RelatedIssuesList
component, and passes its own canAdmin
prop. In other words, either all the items can be removed, or none of them can be. There's no way to individually pick which items are removable or not. We need to add in this functionality. We also need to add the ability to show a custom tooltip.
Proposed solution
The component tree looks like this:
RelatedIssuesRoot
| -> RelatedIssuesBlock
| -> RelatedIssuesList
| -> RelatedIssuableItem (multiple)
-
Modify
RelatedIssuesRoot
andRelatedIssuesStore
so that the related issues have two new properties,actionIcon
andactionTooltip
, whereactionIcon
is the name of the icon to show (if any) andactionTooltip
is the tooltip to show on hover. -
Modify
RelatedIssuesBlock
to not pass downcanAdmin
toRelatedIssuesList
. -
Modify
RelatedIssuesList
and remove thecanAdmin
property altogether, since it no longer needs to be passed down toRelatedIssuableItem
. -
Add two new props to
RelatedIssuableItem
:actionIcon
andactionTooltip
. IfactionIcon
has a value, show the icon and the tooltip if it exists. If not, hide the button.
In short, change the current behavior to have the related issue item data control what icon and tooltip should be shown, not a separate canAdmin
prop that applies to all issues.