Forums

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

Jira Automation previous status key

Mohammad Hamadi November 13, 2024

 

Hello,

I’m working on an automation to automatically send a message to a Teams channel whenever the status of a ticket changes. While I can achieve this, I need help retrieving the first status change along with the latest one.

I can find the latest status, but I’m having trouble identifying the first status. For example:

In Progress > Done

I need the status field key for “In Progress.” Can anyone assist me with this?

Thank you!

3 answers

1 accepted

4 votes
Answer accepted
Fazila Ashraf
Community Champion
November 13, 2024

Hi @Mohammad Hamadi 

Welcome to community!

Referring to https://support.atlassian.com/cloud-automation/docs/jira-smart-values-issues/#--changelog--  , try using the below

{{changelog.status}} - Changelog information for the Status field.

This example shows the previous status for issues that are transitioned.

{{#changelog.status}}{{fromString}}{{/}}
Mohammad Hamadi November 13, 2024

Hi Fezila,

This is what I'm getting when i use changelog.status as response in Teams. 

 

Screenshot_4.jpg

Mohammad Hamadi November 13, 2024

This is exactly what I'm looking for, but I only need the first string and the second string. Is this possible? 

Mohammad Hamadi November 13, 2024

Hi,

Thankyou alot, it works :) Found out how to do it withj {{changelog.status.fromString}} to {{changelog.status.toString}}.

 

Kind regards,

 

Mohammad

Like Fazila Ashraf likes this
0 votes
james ford
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!
November 13, 2024

It sounds like you’re working on an interesting automation project! To retrieve the first status change, you may want to explore the ticket’s history or activity log. Depending on the system you're using, it might involve querying the history of the status field and pulling the earliest entry. For example, using an API that tracks changes over time can help you identify both the first and most recent status.

Speaking of processes, just like automating status updates for tickets, a florist in Las Vegas can benefit from automation in their business too. For instance, automated reminders for order pickups or delivery schedules can make the workflow much smoother and help keep things organized for customers!

0 votes
Marc - Devoteam
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.
November 13, 2024

Hi @Mohammad Hamadi 

Welcome to the community.

You could use "status was" or "status changed"

See advanced JQL, jql-fields-Status 

Mohammad Hamadi November 13, 2024

Hi Marc,

I'm very new at JQL, do you perhaps have an example on how this is used in automation?

Mohammad Hamadi November 13, 2024

Nevermind, I used {{changelog.status.fromString}} to {{changelog.status.toString}} and it works perfectly!

 

Suggest an answer

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

Atlassian Community Events