Hi,
In Jira we have some page which have values like this:
customfield_12345 and customfield_12345:1.
The customfields with numbers are okay, I've checked in the browser with console.
Few lines below is json which I use for curl. But when I use it I got following error:
{"errorMessage":"Unable to to create request because of theses errors : The field 'customfield_12650:1' is not valid for this request type 'Incident'.","i18nErrorMessage":{"i18nKey":"sd.request.create.error.failed.msg","parameters":["The field 'customfield_12650:1' is not valid for this request type 'Incident'."]}}
How should I format json message to get it working?
MESSAGE='{
"serviceDeskId":"1",
"requestTypeId":"12",
"requestFieldValues":{
"summary":"Heya",
"customfield_13225":"'bang bang'",
"customfield_13917":{
"value":"'$TESTENVIRONMENTVALUE'",
"id":"'$TESTENVIRONMENTID'"
},
"customfield_18611":{
"value":"'$SITEVALUE'",
"id":"'$SITEID'"
},
"description":"Hello",
"customfield_13680":{
"value":"Hey",
"id":"161239"
},
"customfield_12650":{
"value":"'$ORGANIZATIONVALUE'",
"id":"'$ORGANIZATIONID'"
},
"customfield_12650:1":{
"value":"'$ORIGINVALUE'",
"id":"'$ORIGINID'"
},
"customfield_14418":{
"value":"Poland (GMT/UTC + 01:00 hour)",
"id":"16053"
},
"customfield_12314":[
{
"value":"Not flow related",
"id":"55564"
}
],
"priority":{
"name":"1",
"id":"4"
}
}
}'
Thanks!
Hi,
The 12345:1 was just an example.
I got this ID from elements tab from browser console, below's screenshot:
Based on 12650 list, different lists should appear in 12650:1, and I want to set that with a script.
Thanks!
Ah, cascading select is not updated like that.
Remove this all together
"customfield_12650:1":{
"value":"'$ORIGINVALUE'",
"id":"'$ORIGINID'"
},
Make the child value part of the field
"customfield_12650": {
"value": "$ORGANIZATIONVALUE",
"child": {
"value": "$ORIGINVALUE"
}
}
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.
Hello @Mainstreamowy Daniel ,
Where are you getting this id 12345:1?
Please share a screen grab if possible. From what I am aware custom field IDs should never contain special characters. They only contain customfield_ followed by digits.
Check the field ID in Custom Fields and also confirm if the field you are looking for is on the global scope or scoped to the project and issue type you are attempting to create.
From your error
"The field 'customfield_12650:1' is not valid for this request type 'Incident'."
1. The ID is not a valid ID
2. The fields scope is not correct
3. The field is not associated to request type with ID 12
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.