Hi there,
I am trying to clone a project on Jira by connecting to the REST API via a python file. I have looked all over the internet and I have not really found what I am looking for. I wondered if anyone here could lend a hand and tell me if it is even possible. ps. if it helps I do have the scriptrunner plugin for Jira. TIA!
Hi @Aaron Korb
Why not write your own code using ScriptRunner for Jira and use custom REST End points?
Ravi
Hi @Ravi Sagar _Sparxsys_,
Thanx for replying. I am unfamiliar with RestEndpoints. Is there a good place to learn this information?
Also, I know script runner already has a built in "copy project" script
So I'm wondering if I can use that and just add these "RestEndpoints to this script?
You can actually call REST to clone with script runner/rest/scriptrunner/latest/canned/com.onresolve.scriptrunner.canned.jira.admin.CopyProject{"FIELD_SOURCE_PROJECT":"SOUCE_PROJECT_KEY""FIELD_TARGET_PROJECT":"TARGET_PROJECT_KEY""FIELD_TARGET_PROJECT_NAME":"TARGET_PROJECT_NAME" "canned-script":"com.onresolve.scriptrunner.canned.jira.admin.CopyProject"}
Would that code inside Payload like this?
Payload = json.dumps({
"FIELD_SOURCE_PROJECT":"SOUCE_PROJECT_KEY",
"FIELD_TARGET_PROJECT":"TARGET_PROJECT_KEY",
"FIELD_TARGET_PROJECT_NAME":"TARGET_PROJECT_NAME",
"canned-script":"com.onresolve.scriptrunner.canned.jira.admin.CopyProject"
)}
Because when I do this it tells me
"unrecognized field" \\\"FIELD_SOURCE_PROJECT\\\
I have put these on my website is a clear form:
https://www.mos-eisley.dk/display/ATLASSIAN/Copy+a+Confluence+Space+with+Scriptrunner+REST
https://www.mos-eisley.dk/display/ATLASSIAN/Copy+a+Jira+Project+with+Scriptrunner+REST
It looks like you're new here. Sign in or register to get started.