Video Screencast Help
Search Video Help Close Back
to help
Not able to make it to Vision this year? Get a sampling in the Best of Vision on Demand group.

Notification Policy Not Working

Updated: 11 Nov 2010 | 1 comment
CMag's picture
0 0 Votes
Login to vote

I found in this forum a topic on closing resolved status incidents after a defined period of inactivity which started in August, 2007.  I want to implement this in my environment (we are still in testing mode).

The task basically says to query the database of any incident which has a status of Resolved that is >= 21 days of inactivity from date of resolution and give me the incident numbers that fit this criteria.  I run to confirm the query works.  I did not get any error and the query reported back 5 incidents.  I double checked each incident number to make sure that the status of each is resolved and that it has been 21 days or more since the incident has been resolved.  All 5 incidents fit the criteria.

I created a schedule and added "Edit Incident Automated Action" to change the incident status to Closed.  Out of the 5 incidents, only 1 of them worked - meaning, the status was changed from Resolved to Closed, and the comment was added as well.  If the run query reported back 5, it should have changed the status of all 5 but it did not.  I looked at the other 4 incidents that did not work and I cannot find anything different from the incident that worked.  I copied the SQL that was posted in 2007 (it had 10 days, we're using 21) and this is how it looks:

SELECT DISTINCT hd1.[workitem_number]
FROM dbo.HD_workitem_current_view hd1
WHERE hd1.[workitem_status_lookup_id] IN (400)
AND datediff(d, hd1.[workitem_modified_on], getdate()) >= 21

Any ideas? I would like to implement this by July 1 so any help will be great!

Comments

MBHarmon's picture
10
May
2010
1 Vote +1
Login to vote

"Once Per Row"?

I'd double check that when you're looking at the Action within your task that you've selected "Once per row" instead of "Once only". 

- Matt