Incident rule to automatically set status to closed after 48 hours

Paul Manfredi's picture

I need an incident rule that will set the status of an incident to closed, 48 hours after the status has been set to resolved by the worker. Help pls

George Wagner's picture

You can do it with a

You can do it with a notification policy. I have that does it in 24 hours. You can't use an incident rule I think since that is only evaluated upon saving a ticket. The notification policy can monitor time as often as you set the schedule to run at.

Here is the query I use:
SELECT    
workitem_number AS 'Ticket_Number'   
FROM    
HD_workitem_current_view    
WHERE    
workitem_status_lookup_id = '400'    
AND    
DateDiff(hh,workitem_modified_on,GetDate()) > 24

-Geo

Don't forget to mark the solution to your forum post if it has been answered!

Paul Manfredi's picture

I'm cool with this part,

I'm cool with this part, but to actually get the status automatically changed to closed, what type of automated action do I need to run.
Thanks
Paul

billyccfs's picture

In the Automated Actions

In the Automated Actions section of the NP, add an "Edit Incident Automated Action". Add a comment like "This resolved incident has not been modified for 'N' hours and has been closed by Altiris." and set the Status ddl to Closed.

Hope this helps.

Paul Manfredi's picture

I'm not seeing a status

I'm not seeing a status ddl. Should I be seeing it in the automated action window? Under Comment I've got External ID: and Source:
"Help", said the newbie.

billyccfs's picture

Make sure you scroll down

Make sure you scroll down (bar on the right). I made that exact same mistake the first time :D

Paul Manfredi's picture

No scroll bar when the

No scroll bar when the default window opens. Thanks for your help.
Paul

George Wagner's picture

Hi, this part is actually

Hi, this part is actually really buggy... there is no scroll bar, but the fields ARE down there below. I was able to get to them by TABing down to them.

I'm sorry I forgot to answer your question completely in the first post. Here's what I do for the Edit Incident Automated Action.

Execute: Once per row
Incident: %DS:Ticket_Number%
Comment: Auto-close after 24-hours in Resolved status with no customer feedback.
Status: Closed

-Geo

Don't forget to mark the solution to your forum post if it has been answered!

caleb's picture

can the results be posted off as a report?

Instead of having the automated action close the ticket, can I get it to email the resolved ticket numbers to a member of staff instead?

xenon2050's picture

Yes you can

Just use the automated email action instead of the incident automated action. In fact if you want, you can do both.

dabomb311's picture

SQL

When i tried putting in that SQL code and clicking the "run" button i got this error message, "View or function 'HD-workitem_current_view' has more column names specified than columns defined'. Does anyone have any ideas??

dabomb311's picture

48 Rule and New Column

So I added the 48 hour rule and it worked, but then when i added a lookup field it stopped working.