Copying JIRA Standard fields from a linked issue during the Create transition doesn't work
This issue applies to JMWE 4.x
only. If you haven't upgraded to JMWE 5,
follow the workaround below.
Problem
Copying a Standard JIRA field from a linked issue (such as the Epic) fails on the Create transition.
Details
This is due to a limitation of JIRA. On the Create transition, post-functions that set standard fields (such as Fix Version/s or Labels) should be put before the Creates the issue originally built-in post-function. But the link between the new issue and its linked issue is not created until the issue is created (during the "Creates the issue originally" post-function) and hence when the post-function runs, it doesn't find the linked issue.
Workaround
Create a hidden transition from the <to_status> of the Create transition to itself, put the post-function on the new transition, and finally trigger it using the Transition Issue
post-function on the Create transition.
Creating the hidden transition:
- Add a transition from the <to_status> of the Create transition to the same status. Name it
Post-create
(for example). - Add the post-function that copies a field from the linked issue to the
Post-create
transition - Add the
Hide transition (JMWE add-on)
Condition to thePost-create
transition
On the Create transition:
- Add the
Transition issue
post-function and specifyPost-create
as the transition to be triggered. - Ensure that it is placed after the Creates issue originally built in post-function.
Note that the outcome of the post-function will likely not be visible immediately - you will need to refresh the issue view to see the new value of the field.