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:

  1. you have a custom field "my company field" configured on your transition screen
  2. 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:

  1. make sure your Post Function is placed after "Update change history for an issue and store the issue in the database."
  2. this way the value is set after the screen has been saved

And here's the reason:

  1. when the transition happens, the field is copied from parent issue to current issue
  2. afterwards, the screen is saved
  3. as there was no value entered in the screen, an empty value is saved and so it oderrides the one copied from parent