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

Python Jira How to detect the previous status of an issue

Jordan Marcio May 5, 2023

I'm currently using python and the jira api to automate certain events that happen on an issue.

Let say an issue was opened and then it gets closed. Then it gets re opened again for a second time.

When I look at the issue's history in the jira gui I can see that series of events.

If I use issue.fields.status in python I can only obtain the current status of the issue.

I want to trigger an action with python for when I search for an issue and that issue status changed from Closed status to Open status for a second time. In other words I want to trigger an action when an issue was reopened.

Do I have to fetch the history of the issue to do this? Is the only place where I see is getting tracked.

1 answer

0 votes
Mohamed Benziane
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 20, 2024


Yes you will need to track the issue history to be able to find in which status was the ticket. Or you can have a script that will look at the result of JQL like this "status changed from "Closed" to "Open""

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events