Automation For Jira - a rule fails with the error "No fields or field values to edit for issues"

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. 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

A rule configured with Automation For Jira fails with the following error found in the Audit Logs:

1 2 3 4 5 Edit issue No fields or field values to edit for issues (could be due to some field values not existing in a given project): <ISSUE_KEY> Can't find issue to copy from customfield_XXXXX
Audit log error

Various scenarios can lead to this error. This knowledge article describes 2 scenarios where this error can happen, how to identify them, and how to fix them.

Please note that this list of scenarios is not exhaustive, as there could be more scenarios which could trigger this error.

Diagnosis

Scenario 1 - A field is copied from the "Parent Issue"

Diagnosis for scenario 1

For this scenario, the rule will occur when an automation rule is configured as described below:

  • The rule is triggered on the Issue Linked event

  • The rule iterates over the linked issues

  • The rule edits the destination linked issue by copying the value of a field from the Parent Issue

Edit issue action

Scenario 2 - A field is copied from the "Epic Issue"

Diagnosis for Scenario 2

For this scenario, the rule will occur when:

  • an automation rule is configured as described below:

    • the rule is triggered on the Field value changed event, monitoring the field Epic Link (which is used to link issues to Epics)

    • the rule edits the trigger issue by copying the value of a field from the Epic Issue

Edit issue _ issue to copy value from
  • An issue was unlinked from its Epic (by clearing the Epic Link field), which can be seen in the issue history tab:

    Issue was unlinked from Epic

Cause

Cause for scenario 1

The reason this error is happening is because Parent Issue can only be used in the setting Issue to copy value from when it refers to an issue which contains sub-tasks, and when the destination issue is a sub-task that belongs to this issue. The issue which contains the sub-tasks will be considered as the "parent" of these sub-tasks.

Since the branch is looping over linked issues (and not over sub-tasks), Parent Issue should not be used. We can't guarantee that the issues being looped are sub-tasks and, therefore, have parent issues.

Cause for scenario 2

The reason this error is happening is because the rule is configured to be triggered whenever the Epic Link field is modified, whether a value is added to it, or removed from it. If this field gets cleared, the following will happen:

  • The rule will be triggered

  • The Edit Issue action will fail because the rule is unable to find an Epic issue linked to that issue (since the Epic Link field is empty)

Solution

Solution for Scenario 1

This solution depends on your use case and what you are trying to achieve with this rule.

If the purpose of this rule is to copy the value of a field from an issue to an issue that got linked to it, the solution consists of replacing Parent Issue with Trigger Issue. in the setting Issue to copy value from:

Replace Parent issue with Trigger issue

Solution for Scenario 2

The solution consists in modifying the rule by adding a condition that will make sure that the Epic Link field is not empty, before trying to edit the issue.

To do this, add an Advanced compare condition component above the Edit Issue action, with the settings below:

  • First Value (copy the value below and press the "enter" key):

    1 {{issue.Epic Link}}

  • Condition: "does not equal"

  • Second Value: leave this field empty

The rule will look like this:

Automation rule reference

The next time the rule is triggered when the Epic Link field is emptied, the Edit Issue action will be skipped, and the audit logs will show the status "NO ACTIONS PERFORMED."

Updated on June 6, 2024

Still need help?

The Atlassian Community is here for you.