PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 10/25/2016 2:13 PM by  Josh B
Automatically unsuspending jobs
 2 Replies
AddThis - Bookmarking and Sharing Button
Sort:
You are not authorized to post a reply.
Author Messages
Josh B
Helpdesker
Helpdesker
Posts:15
Points:21


--
10/24/2016 1:04 PM

    Today I implemented some Priority Manager profiles to automate the unsuspending of jobs once a target date is reached.  Thought I'd share...

    Where to store the date

    On the Timeline tab of a Job, there are 3 date fields, one of which is labelled 'Work commencement date'.  This seems appropriate and we have no other business automation rules using that field.  Alternatively a dedicated date field on the Custom tab of a Job could also work.

    Business logic

    When a Job has a Job Status of 'Suspended' and the 'Work Commencement Date' has passed we want to:

    • Change the job status to 'In Progress'
    • Write a short description to the Action Details, eg. This job was unsuspended because the Work Commencement Date date has lapsed.
    • Email the current assignee notifying them that the job has become unsuspended

    Templates

    • Create an email template for assignee notification
    • Create an action template for the priority manager to use.  This is what changes the job status, adds the note and uses the above email template.

    Setting up a new Priority Manager Profile

    1. Profile Definition: Start by pressing the Launch Job finder button from within the Profile Definition step of a new Priority manager Profile.
    2. In the Job finder, select a Job Status of 'Suspended' then press 'Return search criteria to Priority Manager'.
    3. Click on the 'Use custom SQL search criteria' radio button.  This shows the SQL generated by the Job Finder and makes it easy to build on the WHERE clause as required.
    4. The Work Commencement Date is stored in tblHelpdeskJobs, so all you need to do is add "AND
      WorkcommencementDate < GetUTCDate()" to the end of the query.  (You might like to test this query out with SQL Server Management Studio on a dev system with some test jobs.)
    5. Actions To Perform: Check 'Complete this action template' and select your new action template.
    6. Frequency: I chose to run this profile every 5 minutes during business hours.  Perform all actions EVERY TIME...
    7. Save and Enable the rule.

    I took this a step further and created two other Profiles:

    • Immediately unsuspend jobs that have a null value for the Work Commencement Date.
    • Immediately unsuspend jobs that have a Work Completion Date far off in the distant future.  We agreed an upper limit of 2 months is a reasonable interval to revisit jobs.  For the handful of jobs that are legitimately suspended longer that that, this was, for us, an acceptable trade-off.

    Edited: Changed to GetUTCDate()
    Rod Weir
    HelpMaster development team
    Helpdesk Hall of Fame
    Helpdesk Hall of Fame
    Posts:555
    Points:1017


    --
    10/25/2016 8:19 AM
    Hi Josh,

    Nice post! I like the way you structured the post into Business Logic, Templates, and Implementation - makes it easy to follow.

    Regarding step 4 - the SQL should be using the GetUTCDate(), rather than GetDate(). The reason for this is that ALL dates in the HelpMaster database are stored in Coordinated Universal Time (UTC).
    HelpMaster development team
    Check out the HelpMaster roadmap
    Josh B
    Helpdesker
    Helpdesker
    Posts:15
    Points:21


    --
    10/25/2016 2:13 PM
    Thanks Rod!  I should have remembered HMP uses UTC dates...
    You are not authorized to post a reply.


    New version - HelpMaster v24 now available! by Rod Weir in Announcements with 0 replies A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpr...-f...

    New version - HelpMaster v23 now available! by Rod Weir in Announcements with 0 replies A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpro.com...

    March 2023 v22.7 maintenance release now available by Rod Weir in Announcements with 0 replies A maintenance release for v22.7 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    July 2022 release now available - New version released! by Rod Weir in Announcements with 0 replies A new feature release of HelpMaster is now available!  v22.7.22 For a list of the major new features of v22, see the new documentation site ht...

    June 2022 v22.2 maintenance release now available by Rod Weir in Announcements with 0 replies A maintenance release for v22.2 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    RE: Use PowerBI for HelpMaster dashboards by Rod Weir in Reports and reporting Hi SR, Thanks for the post. Yes, the PowerBI reports for HelpMaster have been well received. Download the latest version, from here. https://www...

    RE: Use PowerBI for HelpMaster dashboards by Scenic_Rim_IT in Reports and reporting Hi Rod - just wondering how PowerBI reports are going? Any chance you have a beta/pre-release version we can help test for you?...

    New version - HelpMaster v24 now available! by Rod Weir in Announcements A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpr...-f...

    New version - HelpMaster v23 now available! by Rod Weir in Announcements A new major release of HelpMaster is now available! Read about some of the new features and improvements here:  https://docs.helpmasterpro.com...

    March 2023 v22.7 maintenance release now available by Rod Weir in Announcements A maintenance release for v22.7 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    July 2022 release now available - New version released! by Rod Weir in Announcements A new feature release of HelpMaster is now available!  v22.7.22 For a list of the major new features of v22, see the new documentation site ht...

    June 2022 v22.2 maintenance release now available by Rod Weir in Announcements A maintenance release for v22.2 HelpMaster is now available! The maintenance release fixes a number of issues that have been reported since the ini...

    February 2022 release now available - New version released! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v22, see the new documentation site https://docs.helpma...

    November 2021 release now available - New Major Version! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v22, see the new documentation site https://docs.helpma...

    May 2021 release now available - New Major Version! by Rod Weir in Announcements A new major release of HelpMaster is now available! For a list of the major new features of v21, see the new documentation site https://docs.helpma...