Update our own custom field type with REST

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

I am able to update other custom fields and there is no error on log.

appreciate any help on this!

1 Like

Try sending the update request to the REST end-point using curl or similar, and telling us what response it gives you.

I tried with transition and update REST api’s but i am able to update other fields but not our own custom field types, do we need to implement any method in out code?

We’ll need some more information in order to help you. What do you see that indicates that you are unable to update those fields?

You should be able to test the update by sending it the exact same request from an HTTP client like curl or HTTPie. The response you get should help diagnose the problem.

1 Like

Hi prasad304,

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)!

1 Like

I tried with /rest/api/2/issue/{issueIdOrKey} and /rest/api/2/issue/{issueIdOrKey}/transitions REST api’s.
As i said, I don’t see any error messages on log and one more thing is i am able to update jira system and custom fields, the problem is with our own custom field types(we have developed our own custom field types which are similar to select and multiselect custom fields)

let me know if any further information requires.

Thanks,

After Implementing RestAwareCustomFieldType, RestCustomFieldTypeOperations interfaces I am able to update our own custom field types using REST