Are you in the loop? Keep up with the latest by making sure you're subscribed to Community Announcements. Just click Watch and select Articles.

Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Earn badges and make progress

You're on your way to the next level! Join the Kudos program to earn points and save your progress.

Deleted user Avatar
Deleted user

Level 1: Seed

25 / 150 points

Next: Root


1 badge earned


Participate in fun challenges

Challenges come and go, but your rewards stay with you. Do more to earn more!


Gift kudos to your peers

What goes around comes around! Share the love by gifting kudos to your peers.


Rise up in the ranks

Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!


Automation get upcomming Issue status

Is there a way to get the status an issue switches into? In the automation issue.status returns the status the issue actually has and not the status the issue will turn into.

2 answers

2 accepted

0 votes
Answer accepted
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.
Nov 06, 2023

Hi @Markus W_ BENES ,

From your comment, it seems like you are running the automation before the actual transition & hence you are getting the previous status of the issue, in this case system would never know which status you are going to, so the automation is working correctly. (It cant predict the future :P)

You need to adjust your automation trigger such that it triggers after the actual transition to the status which you are expecting & then automation will then give you correct status.

Hope it clears your doubt.

@Vishal thank you for your answer; helped me to understand my mistake. This is the code simplified iam using for now:

import com.atlassian.jira.issue.IssueManager
import com.atlassian.jira.issue.MutableIssue
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.config.StatusManager
import com.atlassian.jira.workflow.WorkflowManager

def toChangeIssue = "XX-XXXXX"

IssueManager im = ComponentAccessor.getIssueManager()
MutableIssue issue = im.getIssueObject(toChangeIssue)

def changeItem = ComponentAccessor.getChangeHistoryManager().getChangeItemsForField(issue,'status')?.last()
def transitionFrom= changeItem.getFromString()
def transitionTo = issue.getStatus()
Like # people like this
0 votes
Answer accepted

Hello @Markus W_ BENES ,


Welcome to Atlassian Community!!

Could you please explain the issue in details to understand properly..?

It will better to investigate the solution properly, If you attached the screenshot.



Wasim Ansari

@Wasim thank you for your question. If a user changes the status with a comment the automation event starts. my Problem is that the smart value issue.status returns only the status the ticket actually is an not the status it goes to. For example the ticket is in status "Waiting for Support". Customer changes the status to "Waitung for XYZ" and adds a comment. Event comment added starts but in Automation the status is still "Waiting for Support" and not "Waitung for XYZ". So the automation event goes before the status due the transition is updated.

Hi @Markus W_ BENES ,


Thank you for your response,

As I understood you'll try fetch the upcoming status using automation rule.

This isn't possible because the last transitioned status which is present into the changelog(jira issue history) is  "Waiting for Support" , the data is coming form your issue history it's can't predict your upcoming move.


Somehow if you are looking for your  expected result you have to fetch the value after issue got moved to the next status i.e; "Waiting for XYZ".

 you can use the following smart value to get the status related output:{{issue.status}} - Returns the issue's status

{{}} - Returns the issue's status

Please accept the answer if it will help you😊.




Like # people like this

@Wasim Thanks this was the solution; helped me a lot :D

Like Wasim likes this

Suggest an answer

Log in or Sign up to answer