I'm trying to get a count and the ID or Name of each futureSprint()

Tom Scoggin
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.
September 30, 2024

I would like to automate capturing futureSprint() names and then add the values to a filter for use on a dashboard. I was trying to use the board = "board name" but keep getting an error that I don't have access to it but I'm an admin on the board so I know that's not the issue.

Can anyone point me in the right direction?

I was going to use a REST API to do the loop but could not even get the values to show in a log action.

2 answers

0 votes
Bill Sheboy
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.
September 30, 2024

Hi @Tom Scoggin 

Using an automation rule and the REST API with the Send Web Request action, you could do that in a couple of steps:

Gather the future sprints by filtering on the state: https://docs.atlassian.com/jira-software/REST/9.13.0/#agile/1.0/board/{boardId}/sprint-getAllSprints

Update the filter by changing its JQL, based on the first response: https://docs.atlassian.com/software/jira/docs/api/REST/9.17.0/#api/2/filter-editFilter

Kind regards,
Bill

Tom Scoggin
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.
September 30, 2024

@Bill Sheboy ,

I've only done one other REST automation. Does this look correct? I couldn't print the names of unique sprints to the log file, so I gave up on that. I'm assuming there will be another incoming web part to this.

Capture2.PNG

Bill Sheboy
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.
September 30, 2024

I was answering the question you originally asked.  You would need to review the interface to that call to know if it is correct based on what you are sending.

 

From what I can observe...

That rule uses a scheduled trigger with JQL.  That means it will repeatedly make that call with Send Web Request.  Is that what you wanted to do?

As written using the Lookup Issues action, this will only find future sprints for which there are issues assigned.  Is that what you wanted?

Finally, Lookup Issues returns a list of issues, and the Sprint field is a list of values.  And so your count_n parameter is a list of counts (e.g., 0,3,1,4...) and not a single count of the distinct sprints.  Again, I recommend checking what you want to send in that call and adjusting, as needed.

 

Tom Scoggin
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.
October 1, 2024

Thanks @Bill Sheboy

The trigger will only be a scheduled trigger to originally set the values and then it will be triggered by a field value change. So, every time a Sprint value changes the rule will run.

I'm trying to get a list of all the unique futureSprints() within issues on a specific scrum board. I then want to capture each value for use in a filter or multiple filters that can be used on a Dashboard.

I thought I could use a count value to iterate through each futureSprints() value to add them to the filters. Not sure if that's the best way to do this or not. 

Hope this helps. 

Bill Sheboy
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.
October 1, 2024

Please see my original reply for doing what you asked, as there is likely no need to check the issues to find the future sprints.

0 votes
Shawn Doyle - ReleaseTEAM
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
September 30, 2024

Hi @Tom Scoggin 

Can you give us more details on what you are doing? Screenshots help. 

Thanks

Tom Scoggin
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.
September 30, 2024

@Shawn Doyle - ReleaseTEAM 

Currently I'm just trying to get a list of the futureSprints() to print to the LOG.Capture.PNG

Tom Scoggin
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.
September 30, 2024

@Shawn Doyle - ReleaseTEAM 

This is my last try. It's getting the 73 correct records but not printing the sprint name.

Capture1.PNG

Suggest an answer

Log in or Sign up to answer