The Automation Rule fails if the rule includes an Archived project

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

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

An automation rule fails fails with the error below if the rule scope includes an archived project:

Either you or the rule actor for this rule is missing some required permissions:

(info) Note that having archived projects in the rule scope will also cause another issue which is described in the KB article Cannot enable or save Automation rule due to the error "Either you or the rule actor for this rule is missing some required permissions.

Environment

  • Jira Server/Data Center on any version from 9.4.0
  • Automation For Jira (A4J) Server/Data Center on any version from 9.2.0

Diagnosis

Scenario 1:

  • Set up a new Jira Software Data Center 9.12.12 with Automation for Jira 9.0.3.
  • Create two projects with sample data.
  • Create a new rule: "When the custom field Priority is changed, add a comment to the issue." Set the project scope to these two projects.
  • Edit one issue to trigger the rule to make sure it is working well.
  • Archive one of the projects.
  • Edit one issue to trigger the rule again, and it is still working well in Automation for Jira 9.0.3.
  • Upgrade Automation for Jira to 9.2.0.
  • Edit one issue to trigger the rule, and now it fails. 


Scenario 2: 

  • Set up a new Jira Software Data Center 9.12.12 with Automation for Jira 9.2.0.
  • Create 2 projects.
  • Create a rule and set the scope as the 2 projects.
  • Test and verify the rule is working well.
  • Archive one of the projects.
  • Test again and the rule fails.

Cause

In Automation For Jira 9.2.0, additional checks are added to verify permissions before executing the rule, so the behaviour is different from the one in Automation for Jira 9.0.3. This is done to validate the rule. In this scenario, if one of the projects is archived, the actor will not have permission to add a comment on an issue in that project, which makes the rule invalid. You can verify this by trying to edit and publish the rule without removing the archived project. You will see the same error. In order to get the rule working, invalid projects need to be excluded from selection.

Solution

Remove the archived projects from the rule scope.


Last modified on Oct 31, 2024

Was this helpful?

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