I have 2 post functions set on my workflow. Each post function creates a new issue.
When the second issue is created, I would like to set the Parent Link field within the second issue to the key of the first issue that was created.
This can be accomplished using the transientVars.newIssues[0] property. Can anyone provide examples of how this should be formatted within the post function. I am receiving an error stating the transientVars.newIssues[0] can not be found.
I have tested the workflow without setting this value and the issues are created as expected. This leads me to believe it is my formatting of the post function, i.e. pilot error.
Below you can see the field, Parent Link, being set. It is the Groovy Template I need help to format.
Hi @Jeanne Howe ,
two things:
Hi David,
When set to a Groovy Expression the following error occurs:
Error occurred while creating issue. This could be due to a plugin being incompatible with this version of JIRA. For more details please consult the logs, and see: http://confluence.atlassian.com/x/3McB com.atlassian.jira.issue.IssueImpl cannot be cast to com.atlassian.rm.jpo.env.issues.SimpleIssueAttributes
It seems that you have tried to perform an illegal workflow operation.
If you think you shouldn't get this message, please contact your Jira administrators.
All my plugins are up to date. I am using
Jira 8.17.1
JMWE 6.6.1
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That's odd. That means that field doesn't expect an issue object.
What does the Expected Value help tab show for that field?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is what I see:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Right. So the field expects an issue key, so you need to use
transientVars.newIssues[0].key
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Oh man, seems so simple once you see it.
THANK YOU DAVID!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.