Forums

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

Create a log or snapshot of issues at the start of the sprint

Senthil Kumaran May 29, 2024

Hello community,

 

When I start a new sprint, I want to automatically log/snapshot/send message with list of issues that are part of the sprint at that moment. Given that issues can be added or removed during the course of the sprint, I want to maintain a track of issues that were there at the start of sprint.

 

Caveat: I have multiple projects running with multiple sprints in them and this automation should be triggered for each sprint start.

 

Thanks!

3 answers

1 accepted

3 votes
Answer accepted
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.
May 29, 2024

Hello again,

How about a workaround for the absence of global, sprint-related trigger?  Your Jira Site Admin will need to implement this one.

The way this works is a site webhook sends a message whenever a sprint is started.  That message triggers a global automation rule, and the sprint id value may be used to find the issues in the sprint.

The rule must be created first as it provides the webhook URL needed later.

  • Create a global scope automation rule, triggered on incoming webhook
    • Save the new webhook URL for use later (see below)
    • Assume the {{webhookData.sprint.id}} is what you need to identify the sprint and perform actions, as needed.
      • For example, use the Lookup Issues action with this JQL to load the issues in the sprint:
        • sprint = {{webhookData.sprint.id}}
  • Create a site webhook for "Sprint Started" events
    • Enter that rule trigger's webhook URL from earlier
    • Save the new outbound webhook
  • Test!

I tried this for company-managed and team-managed projects and it worked well.

Kind regards,
Bill

Trudy Claspill
Community Champion
May 29, 2024

Very Cool!!

Senthil Kumaran May 30, 2024

@Bill Sheboy That sounds like a great idea. But I am new to Jira and stuck at 1 point. Would be of immense help if you can guide me here.

I created a webhook the way you suggested. In events, just selected 'Sprint started'. But when I start a sprint, the automation audit log shows that "no issues from webhook" error.

Am confused here as I do have a ticket in the sprint before I hit Start. Also for some reason the sprint start dialog box shows "0 issues will be part of the sprint"

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.
May 30, 2024

If the start-print dialog shows 0 issues, that has nothing to do with rules or webhooks.  Please pause to understand why that sprint contains no issues.

 

Back to the solution I recommended, when that rule starts, it has no issues.  It only gets the sprint id value from the webhook called.

You described wanting to send a message, and the rule could use the Lookup Issues action with this JQL:

sprint = {{webhookData.sprint.id}}

And then list the issues, such as:

{{#lookupIssues}}
* {{key}} - {{summary}}
{{/}}

 

Senthil Kumaran May 31, 2024

Works like a charm @Bill Sheboy . Thank you!

Like Bill Sheboy likes this
2 votes
Mark Segall
Community Champion
May 29, 2024

Hi @Senthil Kumaran and welcome to the community!

You have a few options you can take with Jira automation.  You could send an email, slack/Teams message, etc.  The rule would look something like this:

The rule would start like this:

  • TRIGGER: Sprint Started
  • ACTION: Lookup Issues
    • sprint in openSprints()
  • Your desired action
    • {{#lookupIssues}}
      * {{key}}: {{summary}}
      {{/}}

Another approach is to leverage a hidden field to capture the committed issues and then having automation tag all of those issues accordingly.  This approach allows you to query for what was originally committed vs sprint creep.  The rule would look like this:

  • TRIGGER: Sprint Started
  • BRANCH: Issues in the Sprint
    • ACTION: Edit Issue (Your custom field)

 

Mark Segall
Community Champion
May 29, 2024

To the point @Trudy Claspill is raising, the only way you can do this cross project is if you create a board with a filter that encapsulates all of the projects you wish to track. Then use that board as the source of your Sprint Started trigger

Note - Your rule scope would need to be set to either multiple projects or global to support all of the projects.

Senthil Kumaran May 29, 2024

Thanks for the reply Mark.

 

Although, sprint in openSprints() seems to return issues from all open sprints. And since I have multiple sprints, this would be a problem.

Can that be tweaked to list from only the concerned sprint?

Mark Segall
Community Champion
May 29, 2024

Yes - You can totally get around it by replacing sprint in openSprints with this:

sprint = {{sprint.id}}

 

Trudy Claspill
Community Champion
May 29, 2024

@Mark Segall 

To the point @Trudy Claspill is raising, the only way you can do this cross project is if you create a board with a filter that encapsulates all of the projects you wish to track. Then use that board as the source of your Sprint Started trigger

The sprints would all have to be created from that overarching board.

If that is the board mentioned in the trigger, but the sprint was created in some other board, then the rule will trigger but take no action because the sprint doesn't "belong" to the named board. I tested this and found it to be true.

Here is the board.

Screenshot 2024-05-29 at 1.08.44 PM.png

The filter is project in (CS, TS). The sprints were created in other boards specific to those projects.

 

 

Here is the rule.

Screenshot 2024-05-29 at 1.06.58 PM.png

And here is the Audit Log.

Screenshot 2024-05-29 at 1.07.16 PM.png

 

Mark Segall
Community Champion
May 29, 2024

Ahh good point. When I've done this in my past it was because we performed our sprint creation/start/completion from the consolidated board.  This is definitely an important element to this approach.

1 vote
Trudy Claspill
Community Champion
May 29, 2024

Hello @Senthil Kumaran 

Welcome to the Atlassian community.

Automation Rules do include a Sprint Started trigger, but you are required to select the applicable Scrum Board as part of that trigger. 

I tested out creating a board that used a filter that pulled in all the issues across all projects where issues might be included in a Sprint. Then I selected that board in the Rule trigger. However, the sprints shown in that board actually belong to other boards. When I started one of those sprints, the rule was triggered but said "No Action Taken" because the sprint didn't belong to the board named in the rule.

I don't believe it is possible to create a single Global rule that will work for any sprint started in any board.

I believe to achieve your requirement you would have to create an automation rule for each Scrum board where Sprints are created.

As part of each rule you could add a Lookup Issues action to get the issues contained in the started sprint, and a Send Email action to send a copy of those results to somebody.

Senthil Kumaran May 29, 2024

Hello Trudy,

 

I am ready to create an automation for each board if that is what it takes. But I have multiple sprints, even parallel sprints and I want to list issues from only the concerned sprint when it starts. Would that be possible?

Trudy Claspill
Community Champion
May 29, 2024

Yes, that is possible, using the Lookup Issues JQL information that @Mark Segall provided.

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.
May 29, 2024

Hello, all!

Yes, and...for the global, sprint-related trigger idea, here are the suggestions to add that feature for automation rules:

https://jira.atlassian.com/browse/JRACLOUD-80707
https://jira.atlassian.com/browse/JIRAAUTOSERVER-68

Kind regards,
Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Product Admin
TAGS
AUG Leaders

Atlassian Community Events