I would like to automatically create an epic based on the story transition. The story contains a multiselect field called favourite drink.
When a user selects a the option 'Tea', the epic should be automatically created in the Tea Project and when the user selects the option 'Coffee', the epic should be automatically created in the Coffee Project.
I tried to use ScriptRunner build in scripts but no luck. For testing purposes, I automatically created a story on the Tea project when the 'Tea' option is selected and it works well. But not working for the Epic. I think the reason it may not be working is due to the Epic Name field not completed (I could be wrong)
Hello @Shawn Danisa
What is the error you see in the log files? Is it due to an mandatory field like "Epic name" which you have to set while creating an epic. And if that's the case then you need to set that value in "Additional issue actions"
Hi @Tarun Sapra
It's due to setting the Epic Name.
I had a look at this: https://scriptrunner.adaptavist.com/4.3.3/jira/recipes/behaviours/setting-default-fields.html
But not sure how I would go about setting the epic name :(
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
In the "additional issue action" section you have to write this code, there are some sample already for "Set custom field" (click on expand examples)
def cf = customFieldManager.getCustomFieldObjects(issue).find {it.name == 'Epic Name'}
issue.setCustomFieldValue(cf, 'my value')
And place this post-function the last post-function field of the transition. (After "generic event" fired transition).
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.