- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2015 07:33 AM
I have created a scheduled job to keep the track of priority two incidents that are currently in waiting feedback status and last update was 3 days ago.
But once executed the list of event are not processed and the state always stay as ready. Could somebody explain me what is wrong? The purpose is create a notification. Many thanks in advance
var looking = new GlideRecord('incident');
looking.addQuery('active', true);
looking.addQuery('priority', '2');
looking.addQuery('incident_state', '=', '-10');
looking.addQuery('sys_updated_on', '<', gs.daysAgo(3));
looking.query(); // Issue the query to the database to get relevant records
while (looking.next()) {
gs.eventQueue('incident.p2inactivity',looking,looking.u_owner,looking.number);
}
Bellow the event log summary:
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-30-2015 04:52 AM
Hi,
Is working perfectly fine now. The problem was caused by the event definition.
When I created the new event I set up the Queue field to value '100', which was causing the event to not be grabbed by the event process.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2015 07:42 AM
If I understand correctly, Scheduled job is creating the event but the event is not processed right.
Are you sending notification to correct users?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2015 07:57 AM
Yes, the scheduled job is creating the event as shown in the pictures, but is not being processed.
The first step in order to send the notification is that the event status is processed.
1. ) Scheduled job creates the event.
2.) Based on that event, the notification is send.
Anyway here you have the notification picture:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2015 07:48 AM
I am guessing you want to send these incident reports to the owner of the job, and it seems like the log summary does not show any values for the User ID and User Name. Could this be causing the code to break?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-29-2015 08:02 AM
Hi Kiley,
Yes, the idea is that the owner of the incident gets the notification. First parameter stands fo owner sys_id.
That's correct as incident.inactivity that comes by default shows that kind of numbers as well
Regards