Forums

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

How to get active sprint details of a project?

Daz Daz July 25, 2018

I am trying to create a custom report for a project. Basically, the idea is to list all active projects and their active sprint details. Something like this:

 

Project: Delivery

Current Sprint: Sprint 1

Sprint Date : 1/8/2018 - 31/8/2018

 

Project: Marketing

Current Sprint: Sprint 3

Sprint Date : 5/8/2018 - 20/8/2018

 

I am using Scriptrunner for this. I am able to create project, update project and get the project details. However I am not very sure how do I get the active sprint details of the project. I initially thought that I can get active sprint details by specifying the project name/ID but not really sure on the script. Can any kind soul help me on this? My goal for this question is to be able to retrieve the active sprint details on the project then I will use the details for other purpose. 

 

P.S for each project, we only allow 1 active sprint at the same time. 

 

1 answer

1 accepted

2 votes
Answer accepted
Alexey Matveev
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.
July 25, 2018

Hello,

The problem is that a board is not tied to a project. A board can be connected to multiple projects. If you know boards for projects, then you can get an active sprint following the example below:

https://gist.github.com/jechlin/9789183

J Manas Kumar
Contributor
October 3, 2019

Hi Alexey .. I have tried your code but seems its not working in Jira Dev.Like at line No-13 - Issue issue = issue // provided in binding

I am getting error that variable is undeclared.

I have provided the board too.

line no-16 def rapidBoardId = "TES" ,

if i am providing like the above i am not getting the error, but if i removes the coomas and giving only like u gacve .... TES .. then its throwing error. that variable is undeclared

line 26 - Issue issue = issue // provided in binding  -- variable [issue] is undelcared

line no -29 def view = rapidViewService.getRapidView(loggedInUser, rapidBoardId).getValue() -- cannot find matching method

 

line no 36, 42 - cannot find matching method

line no 37,41,45no such property : name for class: java.lang.object

 

 

Can you help me on this? i m new to groovy..

Suggest an answer

Log in or Sign up to answer