Adding Issue Field to project create screen with REST API

I am wondering if it is possible to find screen id with rest API.

There is an API to add a field to a screen - /rest/api/2/screens/{screenId}/tabs/{tabId}/fields, but I am struggling to find a way to actually find screenIds for particular project. Any clues?

I will only add that I am using module called jiraIssueFields which in fact creates a custom field that can be added to a screen. We are working on a new onboarding and would like to add it to screen automatically.

2 Likes

@dmeyer can you help out Maciej?

Hi @maciej.dudziak,

It’s not currently possible to modify screens themselves via the REST API at this time. We are working on some structural changes to project configurations in JIRA that will enable this in the future.

Other developers who have implemented this module have used a postInstallPage to provide guided instructions on how to direct admins to add the field to correct screens. Keep in mind that admins may not want to add your issue field to all screens in all projects, so the silver lining of this approach is that you don’t need to build a UI that would accompany the API that you’re requesting here.

Cheers,
Dave

2 Likes

Thanks for reply. At the moment we have a Getting Started Page explaining the step. However, we were thinking of creating an “example project” where everything is configured and ready to use. But as you said, maybe this will be possible in the future.

BR,
Maciej

It is possible.

Base URL: https://developer.atlassian.com/cloud/jira/platform/rest

Create Custom fields:
Base URL/v3/api-group-issue-fields/#api-rest-api-3-field-post
Get Screens:
Base URL/v2/api-group-screens/#api-rest-api-2-screens-get
Get Screen Tabs:
Base URL/v3/api-group-screen-tabs/#api-rest-api-3-screens-screenid-tabs-get
Assign Custom Fields to Screen:
Base URL/v2/api-group-screen-tab-fields/#api-rest-api-2-screens-screenid-tabs-tabid-fields-post