What field types are compatible with api/2/field/{fieldKey}/option endpoints?

I am trying to create a select field that I can update the options using the rest API.  There are a complete set of endpoints designed for this purpose, yet when I attempt a GET call on any of my select fields I am returned the following error:

{
  "errorMessages": [
    "The field with the given key does not exist or does not support options"
  ],
  "errors": {}
}

I have attempted creating a new field using the POST /rest/api/2/field method with the following definition:

{
    "name": "New Customer Field",
    "description": "Custom field for picking groups",
    "type": "com.atlassian.jira.plugin.system.customfieldtypes:select"
}

and still I am returned the same error above when I attempt to use any of the /option endpoints.  Can someone please explain what field type are the endpoints designed to work with?

10 answers

1 accepted

For clarification, this endpoint is only compatible with fields that are created with an Atlassian Connect Add-on.  Currently there is no support for editing select field values via API for Cloud instances.

0 vote
Volodymyr Krupach Community Champion Nov 29, 2016

Checked this in my cloud instance and got the same error. Please report a bug: https://confluence.atlassian.com/support/atlassian-cloud-bug-fixing-policy-206865884.html

+1 – Did a bug get logged for this error?

I have a ticket in with the support team, but I was informed this is expected behavior due to the fact this endpoint was intended to only work for fields created by a Connect Add-on.  I was then pointed to this site: https://developer.atlassian.com/ to submit feedback, but when I submitted the form I got this error:

 Screen Shot 2016-12-14 at 8.21.40 AM.png

I am now waiting on support to create the feature request for me...

0 vote
Volodymyr Krupach Community Champion Dec 17, 2016

Hi JP Rowan,

Thank you for sharing the status!

As far as I can tell, you can create an empty custom field, but there are no ways to add values to the custom field using REST.  My successful postman body for creating an empty select list was

{

    "name": "Whatever",

    "description": "Custom field for whatever",

    "type": "com.atlassian.jira.plugin.system.customfieldtypes:select"

}

I was not able to post/put any options, nor do anything effective with options at creation.  Hoping to get some resolution to this.  There has been at least one ticket open for this for over a year sad

 

https://jira.atlassian.com/browse/JRA-36112  Hopefully we can restart the campaign.

From today's support ticket I was told to sit and wait and hope something gets done in that feature request.  I'm following up to see if I can expose those API points myself by writing a rest plugin, but that is a little beyond me and I hope it does not come to that.

0 vote
Volodymyr Krupach Community Champion Dec 21, 2016

Hi Eli,

You can not expose own REST for JIRA cloud. It's possible only for JIRA Server.

Thank you for the definitive answer, it has been difficult finding anything concrete for what can and cannot be done with so many versions of JIRA running around.

 

Do we have any update on this this issue, i also have the same problem with my Jira cloud ? 

Suggest an answer

Log in or Join to answer
Community showcase
Teodora [Botron]
Published Feb 15, 2018 in Marketplace Apps

Jira Inferno: The Nine Circles of Jira Administration Hell

If you spend enough time as a Jira admin - whether you are managing a single, mid-sized instance, a large enterprise one or juggling multiple instances at once - you will eventually find yourself in ...

1,141 views 6 19
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
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot