Hi team, i want to move the issue to another transition , below is the code written but its not working, can someone please help.
def issueKey = issue.key
def result = post("/rest/api/3/issue/DCEOCG-202/transitions")
//.queryString("overrideScreenSecurity", Boolean.TRUE)
.header('Content-Type', 'application/json')
.body([
"transition":{
id: {"261"}
}
])
What does "not working" mean? What error response do you get?
Hi Nic,
I am trying to move the issue from one transition to another and there is a field present at that transition, so i want to update the field also, for which i have written the below script and getting the error message as -
"body: {"errorMessages":[],"errors":{"recommendationExplanation":"Field 'recommendationExplanation' cannot be set. It is not on the appropriate screen, or unknown."}}"
Script -
def issueKey = issue.key
def recommendationExplanation ="customfield_26896"
def result = post("/rest/api/3/issue/DCEOCG-215/transitions")
.queryString("overrideScreenSecurity", Boolean.TRUE)
.header('Content-Type', 'application/json')
.body([
'transition' : ['id' : '21'],
'fields' : [recommendationExplanation : ['value' : 'NA' ]]
])
.asString()
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You mean change status - issues do not have a transition, they are actions that change the status.
Anyway, the error message you are getting is clear. Your action is to transition from one status to another, using the transition between the two that has an id of 21. You are giving it the a field, but that field is not on the transition screen for transition 21
You should check
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.