Workaround the "Version archived" trigger in Automation

Guillaume BERTRAND
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
February 24, 2025

Hi everyone,

I'm trying to setup a script in Automation that I want to be triggered when a version is set to "Archived".

I've used the trigger "Version updated" and tried to add a condition where I test if {{version.archived}} is set to true, 

BUT it seems like the test is done on the "old" value of the field and not the new one :-/ So my rule is actually applied on modifications done on archived versions, and not when a version become archived.

Does anyone have a way to work around this situation ?

 

 

1 answer

0 votes
Bill Sheboy
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
February 24, 2025

Hi @Guillaume BERTRAND -- Welcome to the Atlassian Community!

For a question like this, context is important for the community to help.  Please post the following:

  • an image of your complete automation rule in a single image for continuity,
  • images of any relevant actions / conditions / branches, and
  • an image of the audit log details showing the rule execution.

Until we see those...

Using the Version Updated trigger, I would expect the {{version.archived}} value to contain the current value, not the one from before the update.  And I do not believe there is a changelog available for versions to detect archiving specifically.  You could check if the system audit log contains entries for version archiving in Data Center.

Here is a suggestion to add those other rule triggers for versions: https://jira.atlassian.com/browse/JIRAAUTOSERVER-236

 

The only workaround I can think of would use project, entity properties and multiple rules:

  • When a version is created, add an entity property to the project to track the version attributes (and perhaps the date / time of recording)
  • When a version is updated, use the stored properties to make decisions in the rule.  As a last step in the rule, update the entity properties with the current attribute values to help with future checks.

 

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer