Order of fields via Jira Cloud REST API

Wortex17
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!
April 18, 2024

When querying the fields required to create a ticket via the rest API, the returned fields seem to be sorted alphabetically by their key.

How can I determine the order of the fields as shown in the JIRA web client?
Since project managers can edit the order of fields in the project settings, how can I access this order form a 3rd party app to replicate the behaviour and the project managers intent?

1 answer

0 votes
David Bakkers
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
April 20, 2024

Hello @Wortex17 

As described in that Project settings document you linked to, fields are 'sorted' in the GUI by their placement in a screen. That screen can also contain tabs, which further arranges the fields into groups.

So, to replicate all that, you'd need to get what screens the fields are on, then get the tabs on those screens, then get the fields on those tabs on those screens.

WHEW!

The corresponding REST API endpoints are:

  1. Screens
  2. Screen tabs
  3. Screen tab fields

Have fun!

Wortex17
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 5, 2024

Finally got around to implement this as this is very roundabout just to land in a dead end pretty quickly:
I have a hard time figuring out "which" screen is the ticket creation screen. None of the ones listed to me seem to correspond with the order of fields as defined in the ProjectSettings -> IssueTypes config

grafik.png

When these settings are changed, this is immediately reflected in the ticket creaiton web UI. Conversely, adding tabs and what not on e.g. the default screen (scheme doe snot affect anything there.

 

Also, i cna onyl see the screen config in the global admin panel - there ar enot such settings in my project settings

Tim Bicker
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!
October 15, 2024

HI @Wortex17 ,
I have exactly the same problem. 

I think there is no solution. The problem is that team-managed (next-gen) projects (TMP) don't have tabs. Therefore it's not possible to query tabs for a them and find out the order of fields.

This also explains why all the schemes don't match. It's because TMPs don't have schemes. You queried the schemes for the CMPs (company managed projects / classic projects).

Also the endpoint api-rest-api-3-screens-screenid-tabs-get  does return 
```

{
"errorMessages": [
"Screen with id 10000 does not exist"
],
"errors": {}
}

```

For a screen that does 100% exist because I retrieved the list of screens with api-rest-api-3-screens-get . Which is also the problem in this thread (even though it's `2` API).

Also this thread (3 years ago) has the same problem and an Atlassian staff wanted to find out more in the respective development team but then there was no further communication.

 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events