Menu

Is it possible to send reminders for change, incident, and problem requests?

Josh Dule
2018-11-07
2021-07-22
  • Josh Dule

    Josh Dule - 2018-11-07

    Wondering if there's a way for us to send reminder e-mail after x time has passed for these requests.

    Thank you.

     
  • Vincent @ Combodo

    Yes, with stopwatches, thresholds and trigger on threshold.

     
  • Soji

    Soji - 2021-03-09

    Hello,
    I was wondered the same thing and was surprised that this feature is not native in this application: notification by email 30min before the start_date (change and workorder).

    I saw we have to create a new stopwatches and a threshold but I cannot find any documentation.
    Does anyone have a link to develop that?

    Thanks

     
  • Pierre Goiffon

    Pierre Goiffon - 2021-03-09

    Hello,

    There are already some stopwatches in the existing code, like in UserRequest (fields tto, ttr and cumulatedpending). Take a look at the XML definitions in the datamodels directory.
    The XML reference should help you understand all this :)

    The documentation on notification should then help : Notifications [iTop Documentation]

    Note that those modifications can be made really easily using the ITSM Designer, which is accessible for any subscriber to a support contract.

     
  • Soji

    Soji - 2021-03-13

    Hi Pierre,
    Thanks for your answer.

    I would like to receive a notification by email 1 hour before the start_date of the change execution.
    I tried to implement a new stopwatch for change mgmt :

            <field id="remindchange" xsi:type="AttributeStopWatch">
                 <states>
                       <state id="start_date"/>
                 </states>
                 <working_time/>
                 <thresholds/>
                 <goal/>
            </field>
    

    Then, I created a new notification with this filter:
    SELECT Change WHERE start_date > DATE_SUB(CURRENT_DATE(), INTERVAL 1 HOUR) AND start_date > CURRENT_DATE()

    Did I forget something?

    Thanks for your help.

     
  • Soji

    Soji - 2021-03-18

    Hello,

    After reading the documentation, I think I'm almost done.

                <field id="remindchange" xsi:type="AttributeStopWatch" _delta="define">
                    <states>
                       <state id="plannedscheduled"/>
                    </states>
                    <working_time/>
                    <thresholds>
                       <threshold id="100">
                          <highlight>
                             <code>warning</code>
                             <persistent>false</persistent>
                          </highlight>
                          <actions>
                             <verb>ApplyStimulus</verb>
                             <params>
                                <param xsi:type="string">ev_plan</param>
                             </params>
                          </actions>
                       </threshold>
                    </thresholds>
                     <goal>RemindChange</goal>
                 </field>
    
    class RemindChange implements iMetricComputer
    {
        public static function GetDescription()
        {
                return "Remind agent before start date";
        }
        public function ComputeMetric($oObject)
        {
            $iDelay = null; /* returning 'null' means 'no goal' */
            // If there is a planned_date attribute and it has a non-empty value
            if (MetaModel::IsValidAttCode(get_class($oObject), 'remindchange') && (!empty($oObject->Get('remindchange'))))
            {
              $oStartDate = new DateTime();
              $oEndDate = new DateTime($oObject->Get('start_date'));
              // Calculate the delay between now and the planned_date     
              $iDelay = $oEndDate->format('U') - $oStartDate->format('U');
              // If the planned_date is in the past, we define 0s as the goal
              $iDelay = ($iDelay < 3600) ? 0 : $iDelay;
          }
          return $iDelay;
        }
    }
    

    However, I don't know if the 1 hour threshold setting is correct...
    If not here, where can I set the threshold to 1h before the start_date?
    because I don't want to add a new field for alerts.

    Thanks for your help.

     
    • Dmitriy Smirnov

      Dmitriy Smirnov - 2021-07-15

      Hello.

      Have you been successful in setting up change reminders? Can you tell me where to add the class?

       
  • Jeffrey Bostoen

    Jeffrey Bostoen - 2021-07-22

    You might want to buy the "Notify on Expiration" extension from Combodo. It can do the job (send reminders for objects based on date fields, considering a period that is yet to come or has passed) and comes at a low cost.

     
    👍
    2

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.