sending email by filters using cron expressions

Alexander Bondarev
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.
December 27, 2018

Hello! 

We want to make a 5-10 filters in jira and make group email subsriptions on them.

An idea to use it like a trigger - so we want to use cron expressions for filter, wich will be check it every 1-2 minutes and send email.

Does anyone have a similar experience?

Have you faced with problems associated with a decrease in overall system performance?

Or any problems with mail queues?

maybe anything else?

 

2 answers

1 accepted

0 votes
Answer accepted
Alexander Bondarev
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.
December 28, 2018

@Tarun Sapra, thanks for your answer!

ScriptRunner is wonderful, but it is paid app,

Out of the box in Jira is supports "advanced interval", where we can use cron expressions(which has a great potential!).

cron expressions.PNG

I`ve already done it and it works corrently - like in ScriptRunner or Automation for Jira.

But i`m worried about the system performance...

JQL is the simpliest - just catching overdue tickets(due and assignee) and Recipients - is one of jira`s groups(2-5 persons).

Is it any ways to check an effect of cron expression checking?

 

By the way, can it be dangerous that somebody makes personal subscription using every seconds cron?) 

Is it any ways to catch it?

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2018

Hello @Alexander Bondarev

Yes indeed Script runner is paid and since you just want to send an email to end-users without any issue data transformation thus no plugin is required.

The best way to check the performance is to replicate it on a test machine or if you implement is directly on prod, then monitor the logs, CPU, memory stats etc.,

May I know your use-case as to why do you need the subscription filter to be executed every minute? Isn't 15 minute enough in your case?

Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2018

"By the way, can it be dangerous that somebody makes personal subscription using every seconds cron?) "

Yes it can be dangerous. But we should trust the users. And if you notice anything wrong you can always see the logs as to what is causing an performance problem. 

Like Alexander Bondarev likes this
Alexander Bondarev
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.
December 28, 2018

In general terms, use-case looks like:


We have different SLA, where the difference in 15 minutes plays an enormous value.
For example, if a task is overdue and closed within 1 hour after the delay - this is SLA-1.
If the task is overdue and closed within 1 hour and 15 minutes after the delay - this is SLA-2.
Etc. SLA-3, SLA-4

Therefore, we want to filter tasks that are overdue, for example, by 1 hour and send a email to people who will try to solve the problem within the current SLA.

Therefore, we need in every minute cheking. 

Of course, we have general reports with overdue tasks for analysis.

0 votes
Tarun Sapra
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
December 28, 2018

Hello @Alexander Bondarev

I have implemented similar requirements as to what you want.

Out of the box in Jira is supports the interval of 15 mins. But in your case you want to check the filter every minute and then send the mail. Thus, I would suggest to look at "Escalation service:" by script runner plugin.

https://scriptrunner.adaptavist.com/latest/jira/escalation-service.html

The system performance depends on your JQL and the number of recipients of the emails. For a small number of people and relatively simple JQL filter the performance should not be a problem. 

Suggest an answer

Log in or Sign up to answer