Hello Cool People,
We have used the ScriptRunner add-on to create a new Send Custom Email listener that would trigger everytime a "Critical" Priority Ticket is created. Basically, this will just send an email alert to the a group of people and so far this has been working like a charm. I'm just wondering if someone here in the community had tried or can point me to a right direction on how to make this run on a schedule?
Right now, the alerting runs all day and triggers everytime a critical ticket is created. We wanted this to just trigger when a critical ticket is created between 4:00PM - 8:00PM.
Hopping someone can shed some light and share their expertise on this.
You can use the send custom email listener with the following condition:
def hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) issue.issueType.name == "Critical" && hour >= 16 && hour < 20
Hope this helps,
You can incorporate day of week in the condition like so:
def hour = Calendar.getInstance().get(Calendar.HOUR_OF_DAY) def dayOfWeek = Calendar.getInstance().get(Calendar.DAY_OF_WEEK) issue.issueType.name == "Critical" && hour >= 16 && hour < 20 && dayOfWeek == Calendar.MONDAY
This will send an email for a critical issue created between 4 - 8pm on Monday only.
Badges are a great way to show off community activity, whether you’re a newbie or a Champion.Learn more
Get started on Stride in 3 easy steps If you’re new to Stride, welcome! We’re super excited to have you aboard. Stride is easy to use and set up, so don’t worry about reading tons of borin...
Connect with like-minded Atlassian users at free events near you!Find a group
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no AUG chapters near you at the moment.Start an AUG
You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs