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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to force update of issue ?

One transition consists of 2 plugin postfunctions.

Both postfunctions write to the same field.

I noticed now that what the first postfunction wrote to the field is not available to the second postfunction. It seems that jira only updates the fields when the whole transition is finished. 

In the first postfunction I do  "set this field":

field -> field.createValue(issue, newValue);

And in the second postfunction I do "get this field":


 But in the second postfunction I do not see the field value which was set in the first postfunction.


What can I do that the field value which is set in the frist postfunction is right away saved in the database.



1 answer

1 accepted

Hello Albert,

Updates to a custom field cannot be seen until the issue has been reindexed. Typically issues are reindexed at the end of the Post Function stack, so seeing the old value is often not noticed. However, if you are using a script, you may not see those changes. 

Take a look at the plugin documentation to see if there is a reindex routine or method. For example:

field -> field.createValue(issue, newValue);
// reindex issue here

Please let us know how it goes!



So we found a workaround.

Additional to the existing 2 postfunctions , we introduced a third postfunction which only job is to write to our notification field. So instead of 2 postfunctions writing to this field , we now have only 1 . And now it works. 

Suggest an answer

Log in or Sign up to answer

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