Menu

Send notification (email) if ticket (Incident) is not updated for the last hour

2021-03-10
2021-03-15
  • Michael Maertzdorf

    Send notification (email) if ticket (Incident) is not updated for the last hour.

    We have a customer, for which we should keeps the incident (ticket) hourly update.

    e.g we get the ticket at 17.00, we update the ticket at 17.15, if the ticket stays at the status "assigned" the next update should be done at "18.15" at the latest.

    If the ticket is "pending" (for customer or (external) supplier), this should NOT be done.

    I've found the following in the documentation

    https://www.itophub.io/wiki/page?id=latest%3Aadmin%3Anotifications
    https://www.itophub.io/wiki/page?id=2_2_0%3Aadmin%3Anotifications

    Yet I am not sure this can do the above. (we already get an email if its assigned to an engineer), yet can the trigger also be defined for "last updated? (time based?))

     
  • Vincent @ Combodo

    What you could do within an extension you have to create, is to
    1. define a stopwatch (part of this tuto talks about this: https://www.itophub.io/wiki/page?id=2_7_0%3Acustomization%3Aadd-state) on class Incident for state "assigned"
    2. Define the goal as being one hour (you could hardcode it)
    3. Define thresholds at 100%, 200%, 300% ?
    4. Define triggers associated to those thresholds and notifications attached
    5. Then overwrite the OnUpdate method of the Incident, to check if the Incident was updated (check a change on the caselog or whatever make sense to your customer) then reset the stopwatch. Eg. to reset the 'ttr' stopwatch: $this->ResetStopWatch('ttr');

    Drawbacks of this method, after 2 or 3 reminders, depending on the number of thresholds you have defined, there won't be any notification anymore, so for an Incident still assigned and untouched after 3h (=300%), then no new notification will be triggered.

    Other option, still within an iTop extension, write a new Task (this is pure PHP work), which would on a regular basis perform a check on all objects in scope and trigger each object that are not compliant. The existing extension "Notify on expiration" does this kind of work, also it is designed for a daily run, while you would need a Task running every 5min at least, but it could be a start for understanding part of the logic.

     

    Last edit: Vincent @ Combodo 2021-03-15

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.