Skip to main content
1-Visitor
February 11, 2013
Question

Creating a trigger rule that sends notification after 48 hours

  • February 11, 2013
  • 1 reply
  • 4264 views

I'm trying to create a trigger rule that will send an email notification to a higher level manager after an issue has been in a given state for 48 hours.

This is like issue escalation. I look at the out-of-the-book escalate.js script, but I do not understand how to use at and it does not allow you to enter an escalation time. What I mean is there is no box to to enter X hours or days before the trigger is fully executed.

How can this be done?

    1 reply

    1-Visitor
    February 11, 2013

    I am not sure how familiar you are with triggers in general, the Integrity Admin guide pdf can be very helpful for the background information on how they work.

    There are 2 main ways to fire a trigger, based on a scheduled time or based on an event (there are also some more complex mechanisms around time entry and requirements functionality, but thats not quite relevant).

    To achieve your goal of "email after 48 hours in state X", you probably want to go with a scheduled trigger because a rule-based trigger will only run when the issue is changed in some way... so if the issue is sitting idle for 48 hours, a rule based trigger will not be able to fire for that item.

    That scheduled trigger can run hourly, every few hours, or nightly, depending on your business needs.

    The scheduled trigger will run against every item found in a query it runs against, in this case a query for all items in state X for longer than 48 hours.

    To build that query, you may need to add some fields to the item types you are interested in, such as a computed date-time field which captures when the item entered the state X or a pickfield to identify if the item has already been escalated to a certain level.

    Once you have built the query and added any necessary fields, the escalate.js trigger parameters should start to make more sense.

    To sum up:

    1) Build a query which finds all the items to be escalated, adding new fields if necessary

    2) Use that query with the escalate.js trigger (or write a new trigger script that exactly meets your needs)

    Matt

    DanR.1-VisitorAuthor
    1-Visitor
    February 11, 2013

    This might work for me. I will give it a try and let you know how it goes. I am very familiar with triggers, although some of the out-of-the-box scripts leave me scratching my head. We currently use a modified version of AdvancedEmail.js that works very well.

    Thank you