Hi,
I'm wondering if it's possible to get the list of fields linked to a specific issue type when using the REST API v3 with next-gen projects.
My use case is the following (configured through JIRA interface):
- 2 issues type A and B
- 2 custom fields C and D
- field C should be displayed on issue type A only
- field D should be displayed on issue type B only
Is the information related to the link between A and C available somewhere in the API ?
I know this is using issue type screen schemes when in classic projects but could not find how to do it with next-gen ones
I don't think the next-gen project has an exposed API simply for this, so what you might be thinking might not even be possible to do directly. However, there's always a workaround if you can combine multiple endpoints. To list all field, I believe you can do this by using the /rest/api/3/project/search endpoint parse out the field "style":"next-gen" to identify next-gen only project and grab the projectId from the payload. Then use the project id to find the issuetype on /rest/api/3/issuetype to know all the issuetype added to it and grab the issuetype id. Then lastly search the issue endpoint as you've already gotten the projects identified as next-gen, so you can know which project key it is. In that search, run through every issue filtering the issues by issuetype id and only check the issue if the issuetype are identified. At this point, you can then find the fields within a next-gen issue and probably store this information in a file and get that list that you're searching for.
Thanks for your help here Prince !
That's a bit unfortunate since I'll have to wait for issue of a specific type to be created to get the schema but that's an acceptable workaround for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.