I am trying to create tickets with labels. The statement below works fine without labels, where the errors occur. There must be an issue with how I am structuring labels.
curl -i -X POST -H "Content-Type: application/json" -d '{"fields":{"project":{"key":"QA"},"summary":"'$SUMMARY'","description":"'$DESCRIPTION'","labels":[{"add":"GB0.3"},{"add":"GoBig"}],"issuetype":{"name":"Test Procedure"}}}' -u ${USER_NAME}:${PASSWORD} http://jira.chacha.local/rest/api/2/issue/
Community moderators have prevented the ability to post new answers.
I figured it out on my own.
curl -i -X POST -H "Content-Type: application/json" -d '{"fields":{"project":{"key":"QA"},"summary":"'$SUMMARY'","description":"'$DESCRIPTION'","issuetype":{"name":"Test Procedure"},"labels":["GB0.3","GoBig"]}}' -u ${USER_NAME}:${PASSWORD} http://jira.chacha.local/rest/api/2/issue/
Do you know if the labels are allowed on the Edit Issue Screen?
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.
I havent't used this Restful API but i remember using SOAP Service API and i remember doing something like this.
RemoteFieldValue remoteLabel = new RemoteFieldValue { id = "customfield_id", values = ""}.
Did you try using ...
[{"customfield_id_for_label":"GB0.3"},{"customfield_id_for_label":"GoBig"}]
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is the error I recieve with the changes you asked me to try and with my original statement above.
{"errorMessages":[],"errors":{"labels":"string expected at index 0"}}
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.