In our Jira project we have an automation rule triggered on Issue creation. It creates some related tasks and adds them to the same Epic as the Issue that was just created.
This works fine in Jira but when the Issue is created via Advanced Roadmaps it doesn't work properly.
It appears that AR first creates the issue and, second, sets the Epic Link. This means the automation rule fires before the Epic Link is set.
Is this expected behaviour? Why does AR not create the issue and set the Epic Link in one step? Can anyone think of a good workaround?
I believe it happens due to not being able to create a story in AR with the Epic link populated as part of the (virtual/staging) creation.
See my below experiment.
I created a story via AR, immediately associated with an Epic and then gave it a start date. When you review the changes, it shows created + 2 fields....updated. So this is how it feeds the updates to Jira, as a basic creation followed by updates
See history tab of story:
I'll have a think/play on how to best get Automation to catch these, but the workaround is, create them in Jira where Epic link can be set as part of creation.
Regarding your automation, i think the simplest solution would be to create a manual trigger version of it that you evoke from the epic and it creates the story and associated tasks.
This could be as well as the one that works in native Jira. Then instead of creating the story in AR, open the Epic (from AR), run the manual version....refresh the Plan and as long as they meet the criteria of the Issue sources of the Plan, they will be there.