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

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

Sending a slack alert when all tickets in a Version are complete

Chris Buzon Community Leader Mar 04, 2021

Hey Community.

One of my teams asked me if I could build them a slack alert rule that monitors all the tickets of a version/release on their project, and sends the alert when all of them are completed and the version is ready to be released.

I've found lots of ways to trigger things based on a new version being created or released, but I'm trying to monitor any number of releases for the status of the associated tickets. I don't think "release" is a construct I can actually monitor.
I've seen a solution where you create a release issue type, then use automation to link to the Release issue tickets based on version field, then build the alert based on a child/parent status relationship, but that seems like a hacky way of doing this.

Has anyone else figured out a way to monitor release status with automation?

2 answers

1 accepted

2 votes
Answer accepted

Hi @Chris Buzon 

How about driving this from the issues as they transition using Automation for Jira?

For example, when an issue transitions  to "done", and it has a fixVersion, use a couple of LookupIssues action with JQL for (1) issues in the same version, and (2) issues not-completed in the same version.  You may then check if (2) is zero and ping the team that it is time to release.

Please let me know if you want more details on this approach.  Thanks!

Best regards,

Bill

Chris Buzon Community Leader Mar 08, 2021

That's clever!  I'm going to give that a whirl.  Thanks Bill!

Like Bill Sheboy likes this
Chris Buzon Community Leader Mar 12, 2021

Hey @Bill Sheboy - I'm having no luck with the Lookup function (syntax probably).  
It's easy enough to trigger the rule on the transition to DONE, and checking for FixVersion is easy (I'm just doing fix version is not empty)

I've tried some pretty gross things, but I'm probably thinking about this wrong.

Could you give me an example of how you'd look up issues in the same version? 

I finally got to storing the trigger issue version as a variable, then using that to compare to JQL - but I feel dirty making a variable when I am quite sure this could be done without...

 

Hi @Chris Buzon 

Create Variable helps a bit, and you can do this without one. Please adjust the status names to match your project.

  • Trigger: transitioned to Done
  • Condition: has a fixVersion
  • Action: LookupIssues JQL fixVersion = {{triggerIssue.fixVersion}} and status != Done
  • Advanced Compare Condition: when {{lookupIssue.size|0}} equals 0
  • Action: send the slack alert

If you want to include a list of issues in the message, use another LookupIssues call with a different JQL after the advanced compare condition and before the slack alert

  • ...
  • Action: LookupIssues JQL fixVersion = {{triggerIssue.fixVersion}}
  • Action: send the slack alert with the list
Valuable things are done and ready to release!
<ul>
{{#lookupIssues}}
<li><a href="{{url}}">{{key}} - {{summary}}</a></li>
{{/}}
</ul>
Like # people like this

That is just phenomenal. Thank you @Bill Sheboy

Like Bill Sheboy likes this
0 votes
Chris Buzon Community Leader Mar 18, 2021

I'm posting a screenshot of the answer to my question, using the method @Bill Sheboy  suggested, in case someone else get's stuck in the syntax.

chrome_2021-03-18_14-48-19.png

The thing that tricked me was fixVersion and {{lookupIssueS.size}} - since it will still evaluate, but will always fail to return what is expected.

(don't capitalize the S) 

Thanks, Chris!

And...I continue to be puzzled why the API (used by the automation engine) renames some smart values plural for list fields (e.g. fixVersions) when it is not the same for the JQL.  Or worse, changes the names entirely or changes spacing for multi-word values.

Hopefully the documentation will one day include a glossary, more like the REST API reference, which lists them all on one page.  :^)

Like Chris Buzon likes this
Chris Buzon Community Leader Mar 18, 2021

I would really appreciate a glossary one day!
I'm sure there are smarter ways to do some of the things I am doing, I'm just thinking about them the wrong way.

Again, thanks Bill - your solution really helped me reframe how to approach problems my team gives me.

Like Bill Sheboy likes this

I can's find the action Lookup. Im using a condition but it doesn't work

sfsfsd.PNG

Hi @Surizaday Morones 

Are you on the Server or Cloud version of Jira?  The LookupIssues action is only available for Cloud.

For Server, I believe they have {{issues}} (note the plural value) available for webhook and scheduled triggers.

Best regards,

Bill

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
PREMIUM
PERMISSIONS LEVEL
Site Admin
TAGS
Community showcase
Published in Jira Service Management

Security Advisory for Jira Service Management

On October 20, 2021, Atlassian published a security advisory for Jira Service Management. The full advisory is available at this link.  We've seen a number of questions already asking for...

36 views 0 1
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