How to send a Slack message when linked bug ticket is added to destination issue

arkadiusz_Niewiadomski February 26, 2025

We have a Release board in Jira - it contains tickets that are added manually whenever we'd like to release a new version to our clients.
An automation for Gitlab milestones is listing the issues that are considered in the release. And... during the testing phase of the release process our team creates several issue (bug) tickets. We'd like to be notified (based on one of the custom fields to which certain peoples are assigned) whenever a new bug ticket is created.
We tried to use automation with When: Issue Linked has a type: Relates / Blocks but when trying to get to destination ticket (which is the Release) and we'd like to get the custom field that contains any of the users that need to be notified - it doesn't work :(
We'd like to resolve that on automation level without any dirty dev hacks. Is that possible? Does any of you have a simple solution that can be applied?
I'll be super happy to get some hints on that.

2 answers

0 votes
Alicia Peebles
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
February 26, 2025

Hi Arkadiusz_Niewiadomski!

Couple of questions:

1. Are the Bugs a standard task in your environment or were they configured as a sub-task?  

  • If the bugs are standard tasks you could try using Issue Created - IF Issue Type = Bug, then use an IF statement to either ensure your project or some other qualifying data point to ensure you didn't get everyone's bugs.  Then use the  Email XXXX (using Jira Groups) Or if there is a Custom Field this information is in, you should be able edit the issue first and copy the fields from the Parent or maybe the trigger?
  • Another option might be to use the Linked Issue created and based on what your organization uses for Linked types and if there is a consistency.  I would use that and choose the Linked type that is always used, then maybe add a 2nd IF to look for Issue type = bug.  Then copy the custom field like above to the bug, in the Edit Issue step.  Then Email participants based on that field. 

2. is the Goal just a notification when the bugs are created?

  • if so creating a JQL Filter and creating a subscription utilizing Jira Groups would be an easy way to get a list of Bugs created either immediately or at certain increments during the day (it is nice because you can schedule these for different times daily)

Dependent on the options, let me know if any of this helps. Good luck!

arkadiusz_Niewiadomski February 26, 2025

Hi @Alicia Peebles - think you for your answer.
Yes, bugs are standard issues and are created in 2 different boards but linked to the Release ticket by using - `is blocked by` or `relates to` relations.
I added a validation for certain issue type being linked to ensure that nothing else would trigger the notification. List of bugs are not considered as usually we got 1, max 2 bug tickets per release - it'd be enough to send single notifications when those are linked.

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.
February 26, 2025

Hi @arkadiusz_Niewiadomski 

For a question like this, context is important for the community to help.  Please post the following:

  • what type of project is this (e.g., company-managed, team-managed, etc.), 
  • an image of your complete automation rule in a single image for continuity,
  • images of any relevant actions / conditions / branches,
  • an image of the audit log details showing the rule execution, and
  • explain what is not working as expected and why you believe that to be the case.

Until we see those...

If your rule trigger is Issue Linked, the smart value {{destinationIssue}} may be what you are seeking: https://support.atlassian.com/cloud-automation/docs/jira-automation-triggers/#Issue-linked

Kind regards,
Bill

arkadiusz_Niewiadomski February 26, 2025

@Bill Sheboy- thanks for the clarification - I'm attaching the image with the rule in the shape I thought will do the job but it does not :(

Zrzut ekranu 2025-02-27 o 07.34.26.pngWe are working with company managed projects only.

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.
February 27, 2025

Would you please show the audit log details for the rule execution, and expand all of the areas?

The "blocks" link has direction, so it is possible the rule triggered from the opposite direction and thus the first condition on issue type is failing.

arkadiusz_Niewiadomski February 27, 2025

Sure, here it is

Zrzut ekranu 2025-02-28 o 06.56.03.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.
February 28, 2025

Thanks for that information, and...

As the log shows the source issue AR-92 is not a Bug and so the rule stopped.  This is because the rule likely has single-project scope and the rule executed from an unexpected link direction.  You probably were expecting FS-8656 (the Bug) to be the trigger issue.

Issue Linked (and their directions) can be confusing in rules.  For your scenario, I recommend two changes:

  1. Work with your Jira Site Admin to change the rule to multiple-project scope (in the details at the top)
  2. Either add an if / else to confirm the rule process the correct issues (and link direction), or change your trigger to check the specific link direction needed so the trigger is the Bug

 

I recommend fully testing your rule, perhaps replacing the Send Slack Message action with a write to the audit log until it works predictably, and then put the message action back.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events