It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to get active sprint details of a project?

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

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

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
Community showcase
Published in Jira

The add-in you’ve been waiting for: Jira Cloud for Excel 🙌

Introducing Jira Cloud for Excel Here at the product integrations team at Atlassian, we are thrilled to announce the new Jira Cloud for Excel add-in! This add-in lets you export Jira data directly ...

841 views 5 22
Read article

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