Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

First Blood notification

Max Twemlow November 29, 2022

Hi All

I would like JIRA to send an email notification which congratulates the assignee on being the first to transition an issue to Complete status for that sprint

i.e. if the issue is the first one with that status, then the assignee gets an email

Is this possible?

Thanks

1 answer

1 accepted

1 vote
Answer accepted
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 29, 2022

Hey @Max Twemlow - cool idea. I think I've got it, but haven't tested it.

Basically it triggers when an issue in the project (this is scoped for a single project) transitions to Closed.

It runs a Lookup Issues actions searching for any issues in the same sprint that are Closed. My thinking is that if there is only 1 result (so I check the {{lookupIssues.size}} value, then means you should be the first.

Give it a try, let me know if it works. :-}

Screen Shot 2022-11-29 at 9.33.39 PM.png

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 29, 2022

Ok, tested it and of course found a problem. {{triggerIssue.sprint}} needs to be in quotes, so the JQL should be:

sprint="{{triggerIssue.sprint}}" and status=Closed

I guess if the status you're looking for has two words, that should also be in quotes. 

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.
November 30, 2022

Hi @Max Twemlow -- Welcome to the Atlassian Community!

That is an interesting idea for a scrum team...What about the unintended consequences of rewarding this behavior?  Regardless...

Yes, and...to Darryl's suggestion:

It is possible that multiple issues could complete in a short window of time.  Rather than check the Lookup Issues result for 1-and-only-1-issue, perhaps add to the JQL for the action ORDER BY Resolved ASC and then compare the trigger issue's key to {{lookupIssues.first.key}} and proceed if it matches the first one to resolution.

Kind regards,
Bill

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 30, 2022

I'm so glad you found this ticket @Bill Sheboy because after I came up with my solution, I started thinking "Wait, is this a good idea?"

(I am totally an admin/implementation guy and unlike Bill have not spent ANY time doing actual Agile coaching/managing/etc. But still, after the technical challenge was finished, I did have some thoughts...)

Re: your other point, about multiple issues...

I think it's highly unlikely that multiple issues would complete at *EXACTLY* the same time, since I'm triggering off of the transition to Complete. I suppose there might enough of a delay in Automation processing that multiple issues could be completed *before* the lookup action does it's search, so sure, your recommendation is a good idea *IF* people start noticing they didn't get their "First Blood" emails.

(I'm not a very defensive programmer. More offensive. :-})

Max Twemlow December 4, 2022

Thanks @Darryl Lee I'll try it out

 

@Bill Sheboy what unintended consequence were you thinking of?

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.
December 5, 2022

Hi, Max!

I was wondering about team interaction, trust, commitment, and focus for scrum...versus rewarding individuals completing things.  This can be a balance, and for some teams rewarding individuals may lead people to focus on "my work" instead of the sprint goal and what the team is trying to achieve.

Thanks,
Bill

Like Max Twemlow likes this
Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 7, 2022

Oh hey @Max Twemlow I was testing some other Automations, and they triggered an error from my First Blood automation because my new test issues did not have associated Sprints.

So you probably will want to add this right after the trigger:

Issue fields condition:

> Field: Sprint
> Condition: is not empty

Max Twemlow December 11, 2022

Thanks @Darryl Lee will do

I'm also getting an access error when the sprint was made by my manager, however I'll be making all our sprints going forwards so shouldn't be a big issue:

Custom Smart Value JQL Search: "(sprint="ADT-Q4-2022 : Sprint 4, ADT-Q4-2022 : Sprint 6" and status=Complete) AND (project in (12510))" - Sprint with name 'ADT-Q4-2022 : Sprint 4, ADT-Q4-2022 : Sprint 6' does not exist or you do not have permission to view it.

It's weird because the error says I can't view the sprint, but I definitely can

Darryl Lee
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 11, 2022

Hi Max - for permissions, Automation by default runs with the "Automation User" as the Actor. 

What is a rule actor? 

So then, if you want the rule to run as yourself, with your permissions, you should change the actor to you. Here's the details on that:

Run Jira rules as another user 

Hope this helps, and I'd appreciate it if you can click the [Accept answer] button up above. Thanks!

Max Twemlow January 10, 2023

Good news, the team love it!

Like Darryl Lee likes this

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events