Good afternoon, currently, I have a ScriptRunner script in Jira Cloud that, every time an issue is created, changes the reporter. However, after making the change, the reporter remains anonymous. I have tried, but I cannot get the specified user to be reflected.
import org.slf4j.LoggerFactory
def logger = LoggerFactory.getLogger(this.class)
def updateResponse = put("/rest/api/2/issue/${issue.key}")
.header("Content-Type", "application/json")
.body([
fields: [
reporter: [
name: "ID-User"
]
]
])
.asString()
assert updateResponse.status == 204
logger.info("El ticket ${issue.key}. Se le actualizo el informador")
Is there any way to use a script to change the reporter and have the specified user appear instead of remaining anonymous?
Hi @Marcelo Ulloa ,
it seems to be an issue with the body of the request, it should be something like this:
fields: {
reporter: {
id: "1234567890"
}
}
I hope this helps
Question for you, does the value you included in your "name: "ID-User" " pair an actual user (customer account" in your JSM site?
Please advise.
Lastly, take a look at this previous answered question posting in the community which it may assist with your issue - https://community.atlassian.com/t5/Jira-Software-questions/Scriptrunner-cannot-update-reporter/qaq-p/2519487
Hope this helps.
Best, Joseph Chung Yin
Jira/JSM Functional Lead, Global Technology Applications Team
Viasat Inc.
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.