Is there a way to get Solutions, Functional components and components for a project in Jira

jmweli
Contributor
November 9, 2023

Hi Atlassian Jira Community Developers,

Do you guys know if there is a Jira API that can allow me to pull all the Solutions, Functional components and Components in Jira. For instance, when I create an issue in Jira under a Project and I choose the issue type, further down the form there are mandatory fields like Solution, Functional components and Components I need to populate. All these fields have a drop down list of choices (as shown in the attached screenshots) that I would like to export out of Jira and import into ServiceNow so that when the ServiceNow to Jira integration runs it does not fail because of ServiceNow sending an solution to Jira that does not exist in Jira. Basically what I am trying to do here is to sync the data in these choice fields so that they exist in both platforms and I think the only way to do so is to use an API if there is one. 

Components.PNGFunctional component.PNG

Kindly advise please.

Thanks,

Johannes

2 answers

1 accepted

0 votes
Answer accepted
jmweli
Contributor
November 29, 2023

This API was able to provide me with the data I was looking for: site_url/rest/api/3/project/EAOR where EAOR is the project key. This API returns all the issues and the components under a given project. 

0 votes
Murat Seven
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.
November 9, 2023

Hi @jmweli and thanks for your question.

 

After creating a issue, do you want to retrieve the values in the 'components' or 'Functional components' fields within the request, or do you want to retrieve the available options in these two fields?

jmweli
Contributor
November 9, 2023

Hi Murat,

I would like to retrieve the available options in these two fields. For instance I have a Jira API that I am using to retrieve all available projects in Jira and store them in a ServiceNow table. Also I can import all the issue types for each project in Jira and store that data in ServiceNow using an API. What I am asking here is if there is an API that would let me do the same with functional components and components in Jira, pull all of them and store that data in ServiceNow to reduce integration errors when ServiceNow calls Jira. 

Thanks,

Johannes

Murat Seven
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.
November 10, 2023

Hi @jmweli thank you for your response.


You can following this docs for more.

 

To achieve this, you need to find the contextID value using

GET /rest/api/3/field/{fieldId}/contexts

After obtaining the contextId value, you can send a request to retrieve the customfield values using

GET /rest/api/3/field/{fieldId}/context/{contextId}/option

For example, a sample REST API request would be

GET /rest/api/3/field/customfield_10124/context/10550/option

 

Hope this helps. If the issue is resolved, you can vote and accepted for this comment.

 

Best,

Murat Seven

jmweli
Contributor
November 29, 2023

Hi Murat,

Thanks for your responses above on the question that I had.

Johannes

Murat Seven
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.
November 29, 2023

Hi @jmweli your welcome :) If the issue is resolved, you can vote and accepted for this comment.

 

Best,

Murat Seven

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
TAGS
AUG Leaders

Atlassian Community Events