Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get values custom Select List or simple List?

Mikhail Kislovskiy February 7, 2018

How can i change createmeta url to search values of custom select list or another list?

 

Screenshot_12.png

1 answer

1 accepted

1 vote
Answer accepted
Thomas Deiler
Community Champion
February 7, 2018

Dear @Mikhail Kislovskiy,

somehow you do an API call. I would really like to help you, but please explain a little bit more. Which call did you perform to receive the upper JSON? Which result do you expect?

So long

Thomas

Mikhail Kislovskiy February 7, 2018

Thomas, look it

image.png

But response give mack 404 error Not Found

Mikhail Kislovskiy February 7, 2018

And i see in gchrome on url rest/api/2/customFieldOption/12303/

{"errorMessages":["A custom field option with id '12303' does not exist"],"errors":{}}

 But look

image.png

Mikhail Kislovskiy February 8, 2018

Need to get all allowedValues of some custom list field.

How i can do this without atlassian.jira.dll?

Thomas Deiler
Community Champion
February 8, 2018

Dear @Mikhail Kislovskiy,

I ust pereformed 

https://server.de/rest/api/2/customFieldOption/10300/

and got

{"self":"https://server.de/rest/api/2/customFieldOption/10300","value":"xyz"}

With which call did you get the data of the upper JSON tree? I want to reproduce what you did.

So long

Thomas

Mikhail Kislovskiy February 8, 2018

Need get all allowedValues of one list cutofield_10023. How can i get it without editmeta or createmeta

Thomas Deiler
Community Champion
February 8, 2018

Ah! Now I got it:

You want to list all option of one custom field, right?

This is not possible with the current implementation of the REST API. There is no call for this. For the customFieldOption call you have to know the id, but it is at all returned when querying an issue.

Probably you can do this with this work-a-round.

So long

Thomas

Thomas Deiler
Community Champion
February 8, 2018

Our answers where overlapping ...

Then you can only do this:

Go through all issue and "collect" the options. Ok - if one option is never used - you will miss it.

Alternatively you can GET

https://server.de/secure/admin/ConfigureCustomField!default.jspa?customFieldId=12303

and parse the HTML response.

So long

Thomas

Mikhail Kislovskiy February 8, 2018

Ok. Thnx Thomas

Suggest an answer

Log in or Sign up to answer