Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

How to get number of deployments per sprint

sravani.kambhampati December 5, 2020

I am looking for a way to get how many deployments happened at end of the sprint In Jira board.  Jira is integrated into bitbucket and for CI/CD we are using bitbucket pipelines.

Our sprint closes every 2 weeks. So either Monday or Tuesday morning everyone closes their sprint we need a value to know on all boards.

Do we have any restful Jira API's to hit and get the data. 

 

Please point me in the right direction to get it working.

 

1 answer

0 votes
Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 15, 2020

Hello @sravani.kambhampati ,

I don't use Bitbucket pipelines myself, however, not knowing much about your requirements, I can suggest the following:

  1. Search for all the issues belonging to the desired Sprint, having at least a successful deployment by using the following JQL (replace SPRINT+NAME with the name of the sprint, you can also use the search REST API endpoint to run this search if it needs to be done from an external app): 
    Sprint = "SPRINT+NAME" AND deploymentState ~ "successful" 

     

  2. If you need to get the details, then you can try to use one of the methods discussed in below thread:

 

Another option for point #2 would be to try to use one of the below internal endpoints  that are not officially supported and documented (so I am not sure they also return the deployment information), but they work so far (replace ISSUE_ID with the issue-ID, not the issue key):

 

So, in this latter case you should write a script that:

  1. Calls the search REST API endpoint (GET or POST) to get all the issues belonging to the sprint having deployment information (/rest/api/3/search): 
  2. For each issue returned by the search, gets the issue-id by calling the Get issue endpoint (/rest/api/3/issue/ISSUE-KEY)
  3.  For each issue-id collected in above steps, calls /rest/dev-status/latest/issue/summary?issueId=ISSUE_ID in order to get the deployment related information.

 

For further details, please see:

 

I hope this helps.

 

Cheers,
Dario

Dario B
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
December 17, 2020

Also, in order to provide more details about the dev-status internal REST API endpoints (from How to retrieve deployments on a Jira issue using REST API):

We have the below feature request open in our system since couple of years in order to have a public REST API endpoint to get the information displayed in the development panel:

As you can see the provided endpoints are documented as the workaround for this feature request that got around 50 votes so far. Therefore, we can safely assume that the provided endpoints will keep on working for still some time, or they will be replaced by official ones.

 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.

 

Suggest an answer

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

Atlassian Community Events