Order of Post Functions
The order of post functions can also be configured in JIRA. This can lead to different results, especially when there is a transition screen.
Here is a short example:
- you have a custom field "my company field" configured on your transition screen
- you also use the Post Function to copy the value of "my company field" from parent issue to subtask (with "no override" set)
Now what you would expect, is that the value is copied from parent issue if the user does not enter a value on the transition screen. But what would actually happen is that the field is empty.
How to prevent this:
- make sure your Post Function is placed after "Update change history for an issue and store the issue in the database."
- this way the value is set after the screen has been saved
And here's the reason:
- when the transition happens, the field is copied from parent issue to current issue
- afterwards, the screen is saved
- as there was no value entered in the screen, an empty value is saved and so it oderrides the one copied from parent