Automation rule fails with the error "Could not find valid 'id' or 'name' in resolution object. (resolution)"

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

The error below is observed in the audit logs of an automation rule when the Edit Issue action is executed:

1 Could not find valid 'id' or 'name' in resolution object. (resolution)
Automation Audit Logs

Diagnosis

NA

Cause

The error is coming from the fact that the automation rule is trying to copy the content of the Resolution field from an issue that does not have any resolution yet. The issue is considered unresolved, as illustrated below:

Resolution set unresolved

Since the automation rule does not know what to do with an empty resolution field, it fails to complete and throws the error "Could not find valid 'id' or 'name' in resolution object." in the audit logs.

Solution

To prevent the error from being thrown in the rule audit logs, we recommend adding a condition just before the Edit Issue action that will check whether the Resolution field of the source issue is empty or not.

If we take the automation rule shown in the screenshot of Summary section of this article, it can be modified by adding the Advanced compare condition just above the Edit Issue action, with the parameters below:

First Value:

1 {{triggerIssue.resolution}}
  • Condition: "Does not equal"

  • Second Value: Leave this field empty

The automation rule will look like in the screenshot below:

Automation Rule

Next time the rule is executed and the source issue is unresolved, the Edit Issue action will not be executed, and the status "NO ACTIONS PERFORMED" will be shown in the audit logs:

Audit log

Updated on November 4, 2024

Still need help?

The Atlassian Community is here for you.