I have a jira custom field that I got created by the admins. It is a dropdown with 2 possible field values. One of them is set as a default.
In my shell script from where the data is created, I am trying to update the same custom field to the value which is not the default (if certain conditions are met). After the condition is met, and I am getting the correct value for $customfield1(the other non-default value) and $key(issue number)
I am firing this
curl --silent -D- -u charlie:charlie -X PUT --data {"fields" : {"customfield1": $customfield1}} -H "Content-Type: application/json" -w "\n%{http_code}"https://jira.company.com/rest/api/2/issue/$key
However, no matter what I try, my issue is getting created with the default value of the customfield1. I am not able to override with my other value via this command. Any thoughts?