Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,256,592
Community Members
 
Community Events
164
Community Groups

Get commit information from custom field

Edited

Hi, I have needed information about commit in the custom field ("Development").

When I try retrieve information via:

/rest/dev-status/1.0/issue/detail?issueId={issueId}&applicationType=stash&dataType=repository

I've got:

{
"detail": [],
"errors": []
}

 

When I try retrieve information from fields I've got:

{repository={count=1, dataType=repository}, json={"cachedValue":{"errors":[],"summary":{"repository":{"overall":{"count":1,"lastUpdated":"date","dataType":"repository"},"byInstanceType":{"GitHub":{"count":1,"name":"GitHub"}}}}},"isStale":true}}

 

I need the URL of the commit and file information. How can I get this information?

3 answers

1 accepted

1 vote
Answer accepted

Hello @Dmitry Vakarin ,

Welcome to the Atlassian Community!

If I understand correctly you are trying to get development information via REST API. 

Now, if this is correct, I can see that you are already on the right way but in your REST API call you are saying you want to get the repository information for Stash while it looks like you are actually using GitHub and therefore you get an empty response.

Can you try to modify your REST API call as below and let me know if it works:

https://[NAME].atlassian.net/rest/dev-status/latest/issue/detail?issueId=[ISSUE-ID]&applicationType=GitHub&dataType=repository

 

 

Please notice those are not officially supported endpoints. However, for all the details about these endpoints and how they work (including examples), you might want to review the description of the below feature request:

 

In short (but please review above Feature request for more details and examples):

  1. You can use the internal endpoint /rest/dev-status/latest/issue/summary?issueId=<ISSUE_ID> (replace <ISSUE_ID> with the actual ID of the Jira issue you want to GET the information from) to get the information displayed in the development panel of an issue. 
  2. You can use the information returned by above call to correctly populate the parameters for the endpoint: /rest/dev-status/latest/issue/detail?issueId=10195&applicationType=<APPLICATION-TYPE>&dataType=<DATA_TYPE>

 

Finally, you may want to vote and watch the above feature request so that you will get notified in case of any update. The  feature will be addressed according to the Implementation of New Features Policy.

 

 

Cheers,
Dario

Thank you so much! It's exactly what I needed.

Like Dario B likes this
Dario B Atlassian Team Mar 05, 2021

You are very welcome @Dmitry Vakarin ! I am happy to know this helped.

Have a nice weekend!

 

Dario

Like Dmitry Vakarin likes this
0 votes
Gil Cohen I'm New Here Feb 14, 2022

Is there a way to get more than one dataType in one request? Something like dataType=repository,branch?

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
TAGS

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you