/
How to delete specific issue links in bulk using Jira CLI

How to delete specific issue links in bulk using Jira CLI

This article explains how to delete specific issue links from specific Jira issues in bulk using Command Line Interface (CLI). For example, if you would like to delete only specific issues and specific link type issues like blocks, duplicate etc., you can use deleteLink action along with the runFromCSV action to accomplish this task.Ā Ā 

Instructions

To delete specific issues links:

  1. Create a csv file with the column names issue, toissue and link, as shown below. The file contains specific issues and specific links only
  2. Use the deleteLink action with the parameters, issue, toIssue, link parameters where:
    • issue: Issue key(s) of the original issue(s).
    • toissue: IssueĀ key(s) of the linked issue(s).
    • link: Type of links.

  3. Use the following CLI command to delete the links for the specified issues mentioned in the file.Ā 

    --action runFromCsv --file link.csv --common "--action deleteLink --continue"
    Link 'Blocks' deleted between ZCLI-2 and TEST-2
    Link 'Causes' deleted between ZCLI-1 and SAM-1
    Link 'Relates' deleted between ZCLI-63 and ZCLI-10
    Link 'Duplicates' deleted between ZCLI-32 and TEST-2
    Run completed successfully. 4 actions were successful from file: link.csv
    • For example, the issue, ZCLI-1 contains 2 links.
      Ā 

    • As per the link.csv file, the cli action deletes the link TEST-2 from the issue, ZCLI-1, as shown in the screenshot below:



To delete issue links in bulk:

Use the runFromLinkList action when it is required to perform operations in bulk. When you want to delete the issue links with issue link type,Ā "blocks", then please refer this article on How to use the runFromLinkList action in CLI.

It is recommendedĀ to test this scenario in a test environmentĀ before implementing it in production.Ā 


Related content