Jira Automations to Microsoft Teams

filipa.rodrigues March 20, 2023

Hey all, 

Does anyone know what JQL code I should insert when I want to send an automatic message to teams? 

My goal is to send a warning 2 weeks before a new joiner joins a company so that I can remember to onboard them. I know that you can do it with Slack, I searched for Teams, and apparently it is also possible. 

So, I really need the JQL, but I don't even know where to start, and how to connect Jira to Teams in the first place.

Can someone please help?

2 answers

0 votes
filipa.rodrigues March 20, 2023

Thank you @Rajesh Ramankutty !

Rajesh Ramankutty March 21, 2023
0 votes
Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2023

Hi @filipa.rodrigues , I don't quite understand how JQL comes into play here. It seems to me that if you are creating an issue in Jira for onboarding then the creation of the issue could result in Teams notification. Can you explain in more detail your scenario here? Maybe you need a notification "x days" before the new hire joins? If that is the case then Automation would be the best approach.

automation...

trigger: scheduled daily

condition: JQL example - Status != done and "duedate" <= startofday(10)

action: send Microsoft teams message

filipa.rodrigues March 20, 2023

I am quite new with all of this, sorry if my explanation is not good aha. I saw some videos where people insert something here and they got the results they wanted.

Screenshot 2023-03-20 at 11.59.24.png

Just like in that example you gave: Status != done and "duedate" <= startofday(10).

But I didn't know if it is really necessary or not. In sum, I really just need a way to get automated messages on teams 2 weeks before the new joiner joins the company. I really just don't know where to start.

Rajesh Ramankutty March 20, 2023

Hi you can create a custom field call Data of Joining and 

Sort the JQL same with Date of Joining and then you can set automation rule to trigger email to the team for the same 

hence befor 2weeks for Date of Joining your team will get alert and start working on the same let me know if you have a douts.

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2023

No worries at all @filipa.rodrigues that is why the Community exists, to help each other. 

so yes, I think Automation is the right path. What date field do you have that presents the start date of the new hire? I can create and share an example automation if you like. However, I recommend you try creating based on my above guideline example. It should be quite straightforward. As you initially stated you need to zero in on the JQL. Note that you could test your JQL outside of Automation to see if it returns the expected results. This can be done under Advanced issue search (click in search bar, select advanced issue search, enter the above JQL but replace "due date" with your start date as appropriate.

filipa.rodrigues March 20, 2023

Thank you @Jack Brickey !

Here is the screenshot, it's mentioned as "Start date" 

 

 

Screenshot 2023-03-20 at 14.06.36.png

 

But I will definitely try that one and see if it works! Thank you so much again!

filipa.rodrigues March 20, 2023

It works! The thing is, it's also sending the closed tickets. I tried to do :

Status != "waiting for support" and "Start date 2" <= startofday(10)

Waiting for support is what I have as data field. But it just doesn't work, it shows the tickets as "done" or "canceled" as well. It should me only "Waiting for support".

Screenshot 2023-03-20 at 14.51.41.png

Jack Brickey
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
March 20, 2023

If you use != "waiting for support"  then you will get every status except for waiting for support. In which statuses would you like to send the notification or in which ones would you not wish to send the notifications?

You might consider using the statuscategory term for which there are three categories: To Do, In Progress, Done

For example if you only wanted to send notifications for issues that are not in some form of done status then the following would work...

statuscategory != done

or if you only wanted the notification when in an in progress status then the following would work...

statuscategory = "In Progress"

Finally, if you want the notification in very specific statuses then you would use the following example. Let's say you had the following statuses: A. B, C, D and you only the notification if you were in B or C then...

status in (B,C)

Suggest an answer

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

Atlassian Community Events