Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,298,897
Community Members
 
Community Events
165
Community Groups

Lookup issues looping Slack messages

Hello!

I've got an automation from Jira.

The intention is that every time a deployment happens, the list of issues from the deployment get put into a slack message, and then sent to a slack channel.

What is currently happening is: we get N messages, with N issues in each message. If we've released 10 items in the release, we get 10 messages with all 10 issues listed in each.

What am I missing?

Screen Shot 2022-06-03 at 4.14.39 PM.png

2 answers

1 vote
Simmo Atlassian Team Jun 05, 2022

@Quinn Moffat

Apologies that you've run into this, we really need to rename these actions as it is a bit deceptive. They should be called issue deployed successfully. The trigger runs once for each issue in a deployment.

This is why you are seeing this behaviour.

Cheers,

Simeon.

Hi @Simmo 

Thanks for the information!  From that trigger's smart values, it is possible to detect for which issue the rule is running?  https://support.atlassian.com/cloud-automation/docs/jira-smart-values-development/

If so, @Quinn Moffat could:

  • sort the JQL with ORDER BY Key ASC to feed to the Lookup Issues action, and...
  • add a condition to only proceed with sending the Slack message if the trigger issue is equal to the first one found in the lookup: {{lookupIssues.first.key}}

Kind regards,
Bill

Like Simmo likes this
Simmo Atlassian Team Jun 06, 2022

Hey @Bill Sheboy,

I like it, thats some fancy thinking! I think so. {{issue}} should still work I believe so you can get the issue key that way! 

Like Bill Sheboy likes this

@Bill Sheboy I've given this a go:

I couldn't get the key within the conditional for whatever reason, so I've used the description field.

Screen Shot 2022-06-07 at 11.07.42 AM.png

Like Bill Sheboy likes this

Nice!  I am wondering why {{issue.key}} was not available for the comparison.

Got any ideas, @Simmo ?

Simmo Atlassian Team Jun 07, 2022

@Bill Sheboy not in this case I'm afraid. It should be available or the rule would have errored. Would probably have to work backwards and start by adding a log component for {{issue}} and see what that gives, then go from there.

Like Bill Sheboy likes this

Hi @Quinn Moffat -- Welcome to the Atlassian Community!

Your rule seems to match the same use case shown here for this trigger: https://community.atlassian.com/t5/Automation-articles/New-Build-and-Deploy-triggers-for-Jira-automation/ba-p/1442789

When you look at the audit log, does it show the rule being triggered multiple times for the same deploy?

Kind regards,
Bill

Hey Bill! Correct. One deploy = N iterations,

 

where N is number of issues deployed

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Atlassian Automation

Jira Automation: Sum Up Story Points Roundup (Initiatives -> Epics -> Story/Tasks -> Subtasks)

Hi Everyone, In this roundup we combine all the jira automation rules to sum up story points across different issue types. We start from the lowest level, summing up story points from sub-tasks t...

1,861 views 2 7
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