Automation For Jira - The "Delete Issue Links" action does not delete any link

Still need help?

The Atlassian Community is here for you.

Ask the community

robotsnoindex

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

 

Summary

The "Delete Issue Links" action does not delete any link from a Jira issue even though there are links to other issues as per the "Issue Links" panel.

When checking the automation rule audit logs, we can see that no action is performed:

The purpose of this knowledge base article is to describe one possible scenario where the "Delete Issue Links" action does not work as expected, how to identify it, and how to fix it. 

Environment

  • Jira Server/Data Center on any version from 8.0.0
  • Automation For Jira Server/Data Center on any version from 7.4.0

Diagnosis

  • Open the issue from which the rule was triggered, and verify that it has at least one link to another issue
  • Create a new automation rule using the manual trigger, add a "log action" action with the message below:

    Inward: {{issue.issuelinks.inwardissue.key}} Outward: {{issue.issuelinks.outwardissue.key}}
  • Trigger the rule from the issue, check the Rule audit logs, and notice that the rule is not able to find any inward nor outward issue link:
  • Open the URL below in a new browser tab, after replacing <JIRA_BASE_URL> with Jira's Base URL and <issue_key> with the issue key, and check the output:

    <JIRA_BASE_URL>/rest/api/2/issue/<issue_key>


    • In the API response, search for the string "issuelinks" (which is the JSON key name for the "Linked Issues" field), and notice that this string is missing from the API response:
  • Go to ⚙ > Issues > Field Configurations
    • Click on the Config button next to the Field Configuration used by the project the issue belongs to
    • Scroll down all the way to Linked Issues, and notice the Show link next to this field, which indicates that this field has been set to "hidden":
    • If the Show link is visible next to this field, then this KB article is relevant and you can move on to the Solution section.

Cause

When the Linked Issues field is configured to be "hidden", the following will happen:

  • the issuelinks field will not longer be available from Jira's REST API /rest/api/2/issue/<issue_key>
  • since automation rules rely on the response from this API to access issue data, the data from the "issue links" panel will no longer be available to these rules
  • as a result, the "Delete Issue Links" action will no longer be able to see the issue links and delete them, and the "No actions were performed" message will be shown in the audit logs

(info) Note:

  • Even though this field is set to "hidden", it will still be possible to link issues, and the "Issue Links" panel will still be visible from the "View Issue" screen
  • The fact that the Issue Links are showing in the View Issue screen but not in the REST API response is tracked as a bug is tracked in the ticket https://jira.atlassian.com/browse/JRASERVER-76720. The purpose of this bug ticket is to report the inconsistency between the Jira UI and the REST API.

Solution

The solution consists in making the "Linked Issues" field visible in the "Field Configuration" associated to the project that the issue belong to:

  • Go to ⚙ > Issues > Field Configurations
  • Click on the Config button next to the Field Configuration used by the project the issue belongs to
  • Scroll down all the way to Linked Issues
  • Click on the Show link

To verify that the solution worked, you can:

  • Either access the API link <JIRA_BASE_URL>/rest/api/2/issue/<issue_key>, and check that the issuelinks field is now available in the response:
  • Or run again the automation rule described in the Diagnosis section of this article, and verify that the log action is now showing some data (either for the inward or outward link):


Last modified on Jun 3, 2024

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.