Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

How to update custom field value based on previous status

Hi Team,


How can we update a custom field value based on the previous status of an issue in the post function?

For example: Here the custom field is a select list single choice type, we have to update this field to a value "1" whenever it transitions from some X status.

Again need to update the field to value "2" if it transitioned from Y status via postfunction.

Let me know how to implement this.



Kavya Janiwarda

2 answers

0 votes
John M Funk Community Leader May 17, 2022

Hi Kavya,

Maybe I am not understanding correctly, but you have a workflow that goes from Status X to another status, and you have a transition that goes from Status Y to the same status or another one? 

Why can't you just set a post function each transition to set the value of the field? 

0 votes
Florian PEREZ Community Leader May 17, 2022


this can be quite hard to do. 

Once I did something with scriptrunner using the history of the issue. It was really hard to do and to be honnest it wasn't perfect. 

We finished by using a customfield to hold the value in an array that we dont show on ticket). It was very ugly but functional.

Hope this help

Suggest an answer

Log in or Sign up to answer
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,099 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you