Maximum Number of Issue Links Per Issue
Use this built-in script to find issues that contain more issue links than the recommended amount, and archive or delete the oldest.
View the Atlassian documentation on the recommended number of issue links.
Reporting
This built-in script returns all issues that are over the specified maximum number of issue links. Atlassian recommends a maximum of 1,000 issue links per issue, but you can set your own maximum value.
You can use the Link type(s) filter to search for specific issue links only. You can also use the Issue link filter to search for issues or issue links that fit the criteria of a script. For example, you can search for issues that have a named issue as a destination link, or you can search for issues that have a named issue as a source link. Select Example scripts to see scripts that you can use to filter issues.
Deleting issue links
If this built-in script finds issues with issue links that exceed the selected amount, you have the option to delete the oldest issue links. You can use the Link type(s) filter and Issue link filter, as described above, if you wish to further filter issues or issue links by a set criteria.
Running this built-in script
Restoring archived issues
If you have archived an issue and wish to restore it, see how to restore an issue in the Atlassian documentation.
Tips
Test on your non-production instance first
Be sure to test first on a copy of your production instance. Deleting is a destructive operation, there is no "undo" button.
Delete archived issues after a set amount of time
We recommend that you delete archived issues if they haven't been restored or asked about since X months/years after archiving. The amount of time depends on your company policy when it comes to such matters.