I want to write a groovy script that
Connects to dev JIRA.
Then search for issues, which their summaries contains the word "groovy"
If it exists, output the list of issues by issue key and Summary.
Otherwise, create an issue of that Summary: Issue from Groovy. And description ticket from Groovy.
So can any give me some idea or kick start.
Hey Bob, I am using Groovey Script Runner and I have tried above script in my Jira. But it is giving me an error that
The example references a file path on your server. You need to reference the directory on your file server that contains the JCLI distribution that you installed.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
JIRA Command Line Interface can do most of this automatically and you can drive it from a groovy script if you want.
getIssueList will do the first part with the right JQL query. Then the otherwise part is just: createIssue
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
def cmd = "/sde/atlassian-cli-3.5.0/atlassian jira --action getServerInfo" def process = cmd.execute() process.waitFor() println "return code: ${ process.exitValue()}" println "stderr: ${process.err.text}" println "stdout: ${process.in.text}"
The above used the Atlassian Command Line Interface distribution. If you use the JIRA Command Line Interface distribution then replace the command with something like
def cmd = "/sde/jira-cli-3.5.0/jira --action getServerInfo"
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.