The Atlassian Community Forums are currently in read-only mode. We will be relaunching on a new platform on September 22 (read more here). We apologize for the extended downtime. For concerns or questions, please email communitymanagers@atlassian.com. See you on the other side, on the new Atlassian Community Forums! :)

×

Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

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 Champions.
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

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 25, 2025

Hey @Bill Sheboy , thanks for your answer ! As you can see, I've been doing exactly what you mentioned, and I encourage you to try it for yourself
Capture d'écran 2025-02-25 171706.png

Best regards,

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 Champions.
February 25, 2025

I am using Jira Cloud, and when I tested {{version.archived}} has the correct value.

Perhaps with Data Center's automation the trigger is firing so quickly the data is not updated in time.  You may want to ask your Jira Site Admin to contact Atlassian Support to check if this is a known symptom.

Like Guillaume BERTRAND likes this