Forums

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

Scriptrunner workflow Archive post function

AisM
Contributor
December 19, 2023

Hi,

I want to automatically archive issues that has been moved to the "Cancelled" status.

I tried using the Scriptrunner "Archive this issue" postfunction, I used the below condition- & added it as the last step of the post function after "Fire a generic event that can be processed by listeners"

 

issue.resolution.name == 'Cancelled'
But the issue still isn't getting archived when moved to Cancelled & the script is showing as run successfully. Can I please get some help on what I'm missing ?

1 answer

0 votes
Aron Gombas _Midori_
Community Champion
December 19, 2023

In your description, you write that you want to test the "Cancelled" status, but in that one-liner code you are testing the "Cancelled" resolution! Status and resolution are not the same!

If you really want to work with the status, then the code should be:

issue.status.name == 'Cancelled'
AisM
Contributor
January 1, 2024

@Aron Gombas _Midori_  Thank you for the comment. !!

I changed the code as mentioned and still nothing. After I transition the issue to CANCELLED, nothing happens. But the logs of the script says "success".

Any idea what I'm missing 

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, loom, loom for training, loom for teaching, video training, async learning, online education, screen recording, loom tutorials, loom use cases, atlassian learning, team training tools, instructional video, virtual training tools

🛗 Elevate Your Training and Enablement with Loom

Join us June 26, 11am PT for a webinar with Atlassian Champion Robert Hean & Loom’s Brittany Soinski. Hear tips, stories, and get your burning questions answered. Learn how Loom makes training and enablement easier. Don’t miss it!

Register today
AUG Leaders

Atlassian Community Events