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

0 vote
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!

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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published yesterday in Jira

5 ways you can make the most of Jira Software and Bitbucket Cloud

As part of the Bitbucket product team I'm always interested in better understanding what kind of impact the use of our tools have on the way you work. In a recent study we conducted of software devel...

57 views 0 5
Read article

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