Forums

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

Get values of custom fields for given project

Pawel Pawlak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 27, 2021

Hi,

I am trying to get available values via Rest API for my custom field with id customfield_10104 - it stores the Sprint values. In future I also have a task of reading two more custom fields, so problems basically is not only regarding Sprints but in general with custom fields.
To be honest I think I have tried almost all possible solutions found in the internet. Fields were added manually by admins, not by some any type of external app or what so ever.

Those are attempt that I have tied:

rest/api/latest/field - gives me list of all fields, I can se my field, buto without available options

rest/api/latest/field/customfield_10104/contexts - 404 error

/rest/api/latest/customFields - admin rights are required - the feature in my app should be available for all users

/rest/api/latest/field/customfield_10104/context/defaultValue - 404 error

/rest/api/latest/field/10104/context/defaultValue - 404 error

/rest/api/latest/field/search?id=10104&type=custom - 404

/rest/api/latest/issue/createmeta?projectKeys=TEST&issuetypeNames=Task&expand=projects.issuetypes.fields - in the JSON section for my custom field I do not have any information about available options/values

In JIRA page/app when I try to open create dialog and then open the combobox for sprints the call is made to rest/greenhopper/1.0/sprint/picker , and it gives sprints, but I am guessing this is not what I should use right ?

So is there a way I can get available values for any custom field? Can anyone please help me with that ...

regards,

Pawel

 

1 answer

0 votes
Tuncay Senturk _Snapbytes_
Community Champion
September 28, 2021

Hi,

Have you tried this REST function?

- GET /rest/api/2/issue/{issueIdOrKey}/editmeta

Returns the meta data for editing an issue.

https://docs.atlassian.com/software/jira/docs/api/REST/8.18.0/#api/2/issue-getEditIssueMeta

Pawel Pawlak
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 28, 2021

Hi,

I do not have issue id, since I am just presenting the UI to the user so he can furthermore create from my app issues. I do not have existing issue yet, it is create UI, like it is when you press the 'Create' button in JIRA upper header - you can see custom fields values, although you are not editing existing issue.

cheers

Suggest an answer

Log in or Sign up to answer