Update our own custom field type with REST

Hi,

we have our own custom field type fields(select and multiselect) and we are unable to update those fields with jira REST api's .

appriciate any hel on this!

 

Thanks,

2 answers

This widget could not be displayed.
Sam Hall Community Champion Apr 03, 2017

Hi Rambanam - Since this is a development related question, you might want to try asking over at the developer community site here: https://community.developer.atlassian.com

 

Thanks ! i will post there!

yes, thanks!

This widget could not be displayed.

Hi Rambanam,

You didn't specify what method exactly you are using or what error you get.

But still, here is generic example on how to interact with Jira REST API using curl from commandline (like Linux Bash):

curl -D- -u 'jira-user':'jira-password' -X POST --data '{ "customfield_10000": { "id": "12000" }, "customfield_12000": [ { "id": "13000" }, { "id": "14000" } ] }' -H 'Content-Type: application/json' https://yourjirainstance.com/rest/api/2/issue/


Note that "customfield_10000" is regular dropdown field (where you can choose one option only) and "customfield_12000" is a multi select field (where you can choose one or more options).

Of course you have to replace all the IDs with appropriate ID from your Jira instance.

Also if your JSON string is very long there is a chance your script won't work - there is a workaround for that - just save JSON to file and use:

curl -D- -u 'jira-user':'jira-password' -X POST --data @'/path/to/file.json' -H 'Content-Type: application/json' https://yourjirainstance.com/rest/api/2/issue/


If you need more help I am happy to provide and also share Python example.

Best of luck and let us know if you have solved your problem (and how)!

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

71 views 0 1
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you