Deprecation Notice: deprecation of custom field options APIs (+new APIs published)

Hi Everyone,

We’re excited to announce that we’ve recently published new Jira APIs for custom field options management.
These brand new APIs support custom field options in both global and project-specific contexts.
It’s a full set of APIs to read, create, update, delete and reorder custom field options:

Starting from 7th of May 2021 the following, legacy APIs for custom field options will be no longer available, i.e.:

The legacy APIs have some issues (no project-specific context support, no delete, etc.) that are fully addressed in new release.
So, if you’re using the legacy APIs - please change your code to utilise the new ones.
If you have any questions, let us know in the comments.

Thanks!

9 Likes

Hi @TomaszZasada,

thank you for the great API endpoints. They are really much appreciated.

While developing against those endpoints I found an issue with the Update custom field options (context) endpoint. Changing the value of options in bulk works well as expected. But changing the disabled boolean in bulk will result in the following error. This only affects changing multiple options at once where the value stays the same and only the disabled bool changes.

{
    "errorMessages": [
        "An option value must be unique in its field and a cascading option value must be unique in its option."
    ],
    "errors": {}
}

I also noticed that the endpoints are not working with next-gen custom fields. I guess this is intended behaviour? Just wanted to double check.

Thanks,
Thomas

Hi @TomaszZasada
Is there any plan for changing Issue Field Options API’s also?

Hi @ChakreshTiwari,
There are no plans to change Issue Field Options API. What changes do you mean exactly?
Is there anything missing in those APIs?

Hi @thomas1,
Can you please paste exact request (path, body) that you send?

Thanks for the response @TomaszZasada
I am talking about reorder and enable/disable Api’s For Issue Field Options.

@TomaszZasada
of course. The following path & body combination results in the error I posted above:

/rest/api/2/field/customfield_10113/context/10219/option

{
   "options":[
      {
         "id":"87610",
         "disabled":true
      },
      {
         "id":"87611",
         "disabled":true
      }
   ]
}
STATUS:400 Bad Request

using the same path with just on option works though.

{
   "options":[
      {
         "id":"87610",
         "disabled":true
      }
   ]
}

STATUS:200 OK

I also tried sending the value of an option, but that didn’t change the outcome. To reproduce this you must flip the disabled value to what it was previously (actually change it) or it will run through as well.
Let me know if you need more information to reproduce this.
Thanks

Thanks @thomas1,
It really looks like a bug. Thanks for putting this up!
We’re going to fix it as soon as possible.
I will let you know when it’s done.
PS. Yes - the APIs work only with classic projects. Currently, there are no plans to accommodate for next-gen projects.

2 Likes

No, unfortunately no plans to implement it in the nearest future.

Hi,
thank you for reporting the issue, @thomas1.
I’d like to let you know that it was fixed and deployed on production.

1 Like

Hi @BeataSzturemska
thank you for the quick fix. I can confirm that it works on my end as well. :+1:

1 Like