CA Service Management

Expand all | Collapse all

Close a Request with a particular Area & Status after 30 days

  • 1.  Close a Request with a particular Area & Status after 30 days

    Posted Nov 28, 2016 02:48 PM

    I need to close a ticket after 30 days if it has a custom status of Draft in a particular status. I tried setting up a macro/even that does this but am having no luck. I upped the time to a minute for testing but it still isn't working. 

     

    Below are screenshots:

     



  • 2.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 28, 2016 03:00 PM

    I notice that you have a Repeat Delay Time but your On Done Event Flag is not set to Repeat Event.

     

    How are you attaching this event to the ticket?

    What Actions are you launching when the condition resolves true?



  • 3.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 28, 2016 03:28 PM

    the action adds a log and sets the status to cancelled. I was hoping that maybe you or someone could point me towards a best practice for attaching the event. I'm all ears.



  • 4.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 28, 2016 07:43 PM

    Hello Joel,

     

    Your general approach is right, so I'd persevere with getting it working. No need for fancy SPL code - a basic Event should work just fine here.

     

    Lindsay is also bang on about the "Allow time resetting" being set to No as the reason why it isn't working here. The condition would run once 10 seconds after the Event is first called, and then never again.

     

    Also note that the time is in the form of hours, minutes and seconds. So if you are after 24 hours - a once a day check which seems reasonable here - then the syntax  would be 24:00:00. 

     

    You'll also need this Event to be attached to every ticket of course.

     

    Kyle_R.



  • 5.  Re: Close a Request with a particular Area & Status after 30 days
    Best Answer

    Posted Nov 28, 2016 08:43 PM

    I think the real problem is likely to be that you have not attached this event to the ticket - as Kyle points out.  To have this attached to every new ticket, you must either add the event to every Service Type (and be sure you have a Service Type associated with every Request Area), or else use the 'Auto Events' feature which can be configured to attach one or more events to every new ticket (see Options Manager / Request Mgr / auto_events and click 'Help on this Option' for details - you also need to configure 'auto_events_count' and 'auto_events_name').  Attach the event with a delay of 720 hours (720:00:00) - and to have that take effect you must set 'Allow Time Resetting' on the event, otherwise it will only ever attach with a 10 second delay as you have it currently defined.  You shouldn't need to repeat the event - it only needs to fire once, at the expiry of the 30 day delay.

     

    Hope that helps :-)

    Regards,

    James



  • 6.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 29, 2016 12:58 AM

    >> 'Auto Events' feature . . . Attach the event with a delay of 720 hours (720:00:00)

     

    Good point, James. That way is better if they can. Avoids unnecessary Animator load.

     

    Kyle_R.



  • 7.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 29, 2016 10:32 AM

    Thank you guys! I'm attempting to use the auto events route and am still not able to get it to attach the event. Are site defined conditions allowed with auto events?



  • 8.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 29, 2016 04:11 PM

    Yes they are. Remember that if you turn on Auto Events (auto_events, auto_events_count, auto_events_name) in Options Manager, you will need to recycle Service Desk for that to take effect.



  • 9.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 29, 2016 04:22 PM

    Thanks Lindsay. I got them working but after speaking with CA support and describing what i was up to depending on the volume of requests going through SDM we potentially could be looking at a serious performance hit if I went with this design direction. They're saying instead I should look into using initial notification to activate a condition check looking at first my status and then based on that condition if it tests true put a second timed event to wait 720 hours and check again. this would limit the amount of events placed on the animator load.



  • 10.  Re: Close a Request with a particular Area & Status after 30 days

    Posted Nov 29, 2016 08:55 PM

    If the load is potentially an issue, you might be better to attach the timed event from the Update Status notification, with the condition (status_prev <> 'DRFT' and status = 'DRFT').  That way it will only be attached when your ticket arrives at the DRFT status, rather than when the ticket is first created.  You can use an 'attach event macro' to attach the event.