Forums

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

Changelog for StatusCategory

Gary Spross
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.
January 30, 2023

Is there a way to capture the previous "statusCategory" within an automation that is triggered based on a transitional change?

 

i.e. {{changelog.statusCategory.fromstring}} doesn't seem to work. Is there any other way to determine this?

I've worked around this by creating 2 automation rules, but if I could access the previous Status Category, I could combine and have a single automation rule for what I'm trying to do.

1 answer

1 accepted

2 votes
Answer accepted
Mark Segall
Community Champion
January 30, 2023

Hi @Gary Spross - Status Category is tied to the status so you would do something like this:

{{changelog.status.statusCategory.name.from}}
Gary Spross
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.
January 30, 2023

Hey @Mark Segall

Thanks for the response. I tried what you suggested, but no luck. I logged just the {{changelog}} and the result is: 

Changelog: {resolution=[ChangeItemBean{fieldId='resolution', field='resolution', fieldType='null', from='null', fromString='null', to='10001', toString='Won't Do'}], status=[ChangeItemBean{fieldId='status', field='status', fieldType='null', from='10000', fromString='To Do', to='6', toString='Closed'}]}

So it looks like I can get the status, but not the StatusCategory, unfortunately.

It's no big deal. It would just be nice if I could've consolidated the logic, but it works the way I have it setup.

 

Thanks again for your help!

Mark Segall
Community Champion
January 30, 2023

hmm... Yeah guess it won't work that way.  I know you can get the current status category by providing {{issue.status.statusCategory.name}} so I took a flyer on whether that would work with the change log.

The other option would be to capture the status name from the change log and then perform a send web request action to get the status category for that status.  Here's the API you'd need:

https://developer.atlassian.com/cloud/jira/platform/rest/v3/api-group-workflow-statuses/#api-rest-api-3-status-idorname-get

Gary Spross
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.
January 30, 2023

Oh, good call. I didn't think about doing a web request to figure out the status category from the status. Thanks!

Like Mark Segall likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events