I would like to execute an external script when a new issue is created. I guess I can use Script Runner or maybe other better methods you may suggest. My question is how I pass the key of newly created issue to the script.
This is how to do it:
1) Install the script runner plugin
2) Add a Script Post-Function to the workflow transition (Create transition) and write a custom script for this transition. Make sure your script file also has a package, f.e com.example.
3) Point to the script in the Script file path field of the post function configuration. First add the package name, followed by the class name, f.e com.example.HelloWorld
Your script file (called HelloWorld.groovy) will look something like:
package com.example; import com.atlassian.jira.issue.Issue log.info "Issue id: " + issue.id
In the past, Portfolio for Jira required a high degree of detail–foresight that was unrealistic for many businesses to have–in order to produce a reliable long-term roadmap. We're tur...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs