Bulk Delete Issue Links

Sergio C Silva June 22, 2015

Some users improperly created an absurd number of links between issues of two two projects. This is causing serious JIRA performance impacts.
Removing these links manually is not viable, so I would like to remove these links directly into the database?
Is that possible?
Is there any other way to bulk remove issue links?

7 answers

2 votes
Tiffany Mathews January 16, 2019

The only way I was able to do anything was to go to the primary ticket (the one with all the others linked and delete each link) It was tedious but better than jumping from ticket to ticket to delete the links. I really can not stand that so many logical things need plug-ins/add-ons to do in JIRA. I am not a developer and I feel like you have to be one to get JIRA to do what you need it to do 50% of the time. This should be a bulk change feature!

1 vote
mike February 20, 2019

Contents of Bob Swift's link (however it doesn't appear to be a solution):

Sergio Silva· over 3 years ago
Some users improperly created an absurd number of links between issues of two two projects. This is causing serious JIRA performance impacts. Removing these links manually is not viable.
I saw in the JIRA cli addon documentation that I can delete issue links via comman line, but in the example are required of the issue keys and link type. With JIRA cli I can delete all links of a particular type of all issues found with a JQL search?

==========

Bob Swift [Bob Swift Atlassian Apps] answered on this - over 3 years ago
Yes, I think so. You front end the deleteLink with a runFromIssueList specifying the jql parameter.

----------

Sergio Silva - over 3 years ago
Hi Bob!
Thanks for your reply.
I am testing this resource and I used the commands below unsuccessfully:

C:\JIRA CLI>jira --action runFromIssueList --jql "issueFunction in hasLinkType('Blocks')" --common " --action deleteLink --link "10000""
Run: --action deleteLink --link 10000
This function requires a non-blank value for parameter: issue
Client error: 1 actions failed

**********

C:\JIRA CLI>jira --action runFromIssueList --jql "issueFunction in hasLinkType('Blocks')" --common " --action deleteLink --issue @issue@ --toIssue @issue@ --link "10000""

Run: --action deleteLink --issue TP-2 --toIssue TP-2 --link 10000
Remote error: JIRA reports: Cannot find link matching these parameters.
Client error: 1 actions failed

I am understanding that I always have to inform the issues that have the link and if I use the reference @issue@  it tries to evaluate a link from one issue to itself.
Some idea?

1 vote
tiffany.trapasso February 1, 2018

Is there no answer to this question yet? I have about 280 issues to delete and the window doesn't even refresh each time I manually delete so it's hard to figure out where I left off without waiting for an error. This is pretty frustrating :(

Mehdi Layouni July 5, 2018

Hi Tiffany,

It would be possible to write a JAVA Program communicating with the REST API of your JIRA Server: First you read the Link-IDs of your issues in focus and then delete them (also using the REST API)

Cheers,

Mehdi

1 vote
Bob Swift OSS (Bob Swift Atlassian Apps)
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
June 22, 2015

See the answer to this question: Bulk delete issue links.

Richard Donnell November 14, 2017

Hi @Bob Swift OSS (Bob Swift Atlassian Apps) could you make the link above available again please? I get access denied.

Bob Swift _Appfire_ November 14, 2017

The link is still valid. If it shows a blank page then just refresh your browser and it should show the page correctly the second time. It is some display bug in Confluence/Questions :(.

Richard Donnell November 14, 2017

Hi bob, I still get access denied, thanks for replying though.

Bob Swift _Appfire_ November 15, 2017

Oh, yes, the recent upgrade of Atlassian Questions for Cloud prevents anonymous access like it was before - very frustrating :(. 

You need to login with your Atlassian id to get access.

Eleina Hayes Espigh April 26, 2018

I've logged in but cannot access the answer

0 votes
Hurcus Ibrahim April 1, 2020

This appears to be an ongoing issue.

I raised a ticket and was referred to two third party apps including JIRA CLI and Scriptrunner for JIRA.

The only solution is to delete the issue of the link you want to remove - then re-create the issue using the same Key..

If you're wondering whether you can do this - you can. You are able to assign the same key of an item you have deleted, when uploading, the issue is re-created. You will lose the historical information, which may not be a big deal.

Not a bad compromise. 

socaciu_radu January 28, 2021

What will happen with the history of the ticket that you are deleting? What if some users have rights to delete issue links , but not to delete the issue ? Unfortunately this is not a good compromise in way to many scenarios. I cannot belive that there is no easy way to delete issue links.

Hurcus Ibrahim January 28, 2021

If the work involved in removing the links is far too time consuming, ask the administrator to delete the issue (this will remove the links) then re-upload the issue using the same JIRA key. If you want the history, perhaps you can copy the history and add it as a comment to the new issue. 

0 votes
Daniel Schaeffer January 16, 2019

There is a field in bulk edit for changing links but as far as I can tell, it doesn't do anything.  I tried setting them to blank.

0 votes
Daniel Schaeffer January 15, 2019

Still no answer?  Can someone just paste the contents of that link's page here?

Suggest an answer

Log in or Sign up to answer