Forums

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

Detecting when an issue is closed

Jon Bartholomew
Contributor
August 16, 2018

What is the best way to trigger an Automation for Jira rule when an issue is closed?

1 answer

0 votes
Jonny Adams
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.
August 16, 2018

@Jon Bartholomew I recommend using "Field Value Changed" and select either "Status" (if moving to Closed status is the trigger) or "Resolution" (if setting a resolution (Done, Won't Done,  etc) is the desired trigger). 

Jon Bartholomew
Contributor
August 16, 2018

@Jonny Adams I would rather use status as we have had issues with resolutions not always registering as changed or not being cleared if reopened.

How can I check that it has changed from active to closed? I would normally use the status category (Done) and I see that you can have string functions of From and To, but I had trouble formatting these to get the values.

Thanks.

Jonny Adams
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.
August 16, 2018

I think you can keep it relatively simple. The trigger is that the Status value has changed. So, if you set a JQL condition where "status = done" then the automation should know that this issue had a status change and the status now equals done so it will apply whatever action you set.

Jon Bartholomew
Contributor
August 17, 2018

Thanks for your time on this question.

The two issues I was really having were accessing the statusCategory smart value and its From and To values using the smart value functions, so that I could check it was moving from an active category (not "Done") to a closed category ("Done"). This would catch those occasions when a status is moved from a closed type to another closed type.

However, I am probably over complicating the actual rule, and could complete it with a simple status value change trigger and JQL condition of "StatusCategory = Done" as you suggest.

But it would still be good to get an example of how to get at the From and To values. :)

Jonny Adams
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.
August 17, 2018

In regards to specifying status change you could use from and to as follows.

status changed FROM Closed TO Done

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events