Hello,
How do I copy reporter from a linked issue in Jira cloud?
In server we use groovy and copy reporter in script runner. How do we do the same in JIRA cloud?
Thanks a ton.
Hi Shreyas,
I have created some example code which shows how you can get the set different user picker fields in a script run from the Script Console which can be viewed here. This code will show you how to set the assignee, reporter and custom user picker fields on an issue and can be used to help you modify your script.
If this answer has solved your issue can you please accept it in order to mark this answer as correct for users who are searching for a similar issue.
Regards,
Kristian
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello,
There is ScriptRunner for Cloud as well. Have a look at it:
http://scriptrunner-docs.connect.adaptavist.com/jiracloud/quickstart.html
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The sample script runner script:
def issueKey = 'PROJ-13'
def newSummary = 'Updated by a script'
def result = put('/rest/api/2/issue/' + issueKey)
.header('Content-Type', 'application/json')
.body([
fields:[
summary: newSummary
]
])
.asString()
if (result.status == 204) {
return 'Success'
} else {
return "${result.status}: ${result.body}"
}
have options to set text fields. But using the same to set a reporter field gives the following error:
400: {"errorMessages":[],"errors":{"reporter":"data was not an object"}}
How do I set a user field?
Thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I do not have ScriptRunner for Jira Cloud, but I guess it should be like this:
[fields:
[
summary: newSummary,
reporter: [
name: jirauser
]
]
]
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.