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":
issue.getCustomFieldValue(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.
Thanks.
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!
Regards,
Hyrum
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.