Forums

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

How to send a slack DM if an issue sits in a status too long

Mara Julin January 21, 2022

Our team is noticing that our tickets are sitting in the QA status for a long time. Ideally we'd love to send a Slack DM to whoever is "assigned" to the ticket if the ticket is in the QA status past 48 hours (to remind them that we are waiting on their QA).

Is there a way to have this level of customization? I've seen options for when statuses are moved, etc; but not triggering after a certain amount of time and to send a message to a specific person.

 

Help!

2 answers

1 vote
Steven Tonge
Contributor
July 27, 2022

To send a message to the Assignee in a Slack message, you can use the following in the "Channel or User" field in Send Slack Message in Jira automation:

 

@{{issue.Asignee.emailAddress.substringBefore("@")}}

1 vote
Mikael Sandberg
Community Champion
January 21, 2022

Hi @Mara Julin,

Welcome to Atlassian Community!

You can do this with automation, but in order to send a DM you would need the Slack ID for the assignee. Instead of using DM you could use a channel and use @ mentions instead, that is how we do it to notify PMs when we have new customer escalations for example.

We do DMs as well, but we have to use an iPaaS tool to do that, in our case we use tray.io for it. The workflow is that the automation triggers a web hook to tray.io and we send over the the user's email address. Then in tray we look up the user in Slack and then send a DM to them. 

Mara Julin January 21, 2022

Thank you! where do I set up the automation? I'm only seeing options like "trigger when status is moved" but this doesn't work with my case since i want to trigger it when status hasn't been moved after X time.

Mikael Sandberg
Community Champion
January 21, 2022

You can use the scheduled trigger to do this. Here us an example from the automation library:

Screen Shot 2022-01-21 at 11.19.30 AM.png

Daniel Eads
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 21, 2022

As an add-on to the answer about DMs, there is a script you can run that will get the Slack UIDs and store them in a user property that Automation can access. Details here: Mention someone directly in Slack via Jira Automation 

Like Mikael Sandberg likes this
Robert DelFave February 22, 2022

@Mikael Sandberg any idea what the automation would look like if I want to ping a Slack channel if issues have been sitting open for a certain amount of hours?

Mikael Sandberg
Community Champion
February 22, 2022

@Robert DelFave It would look similar to the one I posted above, just remove the transition part and use the "Send Slack message" action instead of the add comment one. In order to send a Slack message you need to have an incoming webhook in Slack, and you can easily create one by following their instructions here.

Robert DelFave February 23, 2022

@Mikael Sandberg any chance you could help me out here? I have the automation built but I don't believe it's actually set to do what I want.

Screen Shot 2022-02-23 at 3.24.35 PM.png

What I am looking to do is set the automation to ping the specific Slack channel when issues in the filter have been sitting for X amount of time. 

Mikael Sandberg
Community Champion
February 23, 2022

You are correct, the JQL needs to be changed. It should look something like this:

"Request Type" = Email(MWTR) status = "QA" and updated < -48h

This should give you all Email request type in the QA status that have not been updated in the past 48 hours.

Suggest an answer

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

Atlassian Community Events