Video Screencast Help
Search Video Help Close Back
to help
New in the Rewards Catalog: Vouchers for "Symantec Technical Specialist" and "Symantec Certified Specialist" exams.

Reporting of Incidents where it changes from one owner to another

Updated: 23 May 2010 | 4 comments
acachero's picture
0 0 Votes
Login to vote

I require a report where it shows any incidents which have changed "Workgroups" more than 3 times.

The purpose of this is to determine the incidents have been "handballed" from one Workgroup to another.

I am unable to think of how this can be done.

Can anyone please help?

discussion Filed Under:

Comments

drew.ohara's picture
28
May
2008
0 Votes 0
Login to vote

Reporting On Incidents Where Owner Changes More Than 3 Times

I've been working on this SQL for a little and it seems to be what you're looking for. It will count the distinct Workgroups that have Owned the incidents. I've modified it for you to only show incidents with more than 3 distinct Owners. Depending on the time frame you're looking for, you may want to change the date range too. Right now it's set to get results for the previous month up to the day/time it's run. Just paste this query in a report. Let me know if this helps.

select workitem_number,
count(distinct Owned_by_worker_name)
from hd_workitem_detail_view
where datediff(MM,workitem_created_on,getdate()) <= 1
group by workitem_number having count(distinct Owned_by_worker_name) > 3
order by workitem_number asc

acachero's picture
09
Jun
2008
0 Votes 0
Login to vote

Reporting on Incidents where owner changes more than 3 times

Hi Drew,
Thanks for your assistance with this.
I've ran your query and it looks like it's something i'm after. However, is it possible to use the 'workitem_current_view' as I'm requiring incidents which are in 'Assigned', 'New' or 'Pending' status?
Many thanks.
Regards,
Aileen

acachero's picture
11
Jun
2008
0 Votes 0
Login to vote

Reporting on 'Comments'

Can someone please provide assistance or guidance in how I can create a report where it displays a specific text within the 'Comments' field?

I've used the Wizard and compiled the SQL below:

SELECT [HD_workitem_current_view].[workitem_number] AS 'Incident Number', [HD_workitem_current_view].[workitem_created_on] AS 'Created On', 
[HD_workitem_current_view].[workitem_comment] AS 'Last Comment', 
[HD_workitem_current_view].[owned_by_worker_name] AS 'Queue', 
[HD_workitem_current_view].[workitem_priority_lookup_value] AS 'Priority', [HD_workitem_current_view].[workitem_urgency_lookup_value] AS 'Severity', [HD_workitem_current_view].[workitem_category_tree_value] AS 'Category', [HD_workitem_current_view].[workitem_due_on] AS 'Due Date', 
[HD_workitem_current_view].[workitem_status_lookup_value] AS 'Status' FROM [HD_workitem_current_view] INNER JOIN [HD_workitem_detail_view] ON [HD_workitem_current_view].[workitem_number] = [HD_workitem_detail_view].[workitem_number] 
WHERE [HD_workitem_detail_view].[workitem_comment] LIKE '%Latest Update%' AND [HD_workitem_current_view].[workitem_status_lookup_id] < > 600 AND [HD_workitem_current_view].[workitem_type_lookup_id] = 5 ORDER BY [HD_workitem_current_view].[workitem_created_on] ASC

When the SQL is run, it shows ALL incidents which have 'Latest Update' within the comments - that's fine if the last comment had 'Latest Update....' on it.
However, if the 2nd last update was had 'Latest Update' within the comments field but then had 'Assigned to' as the last comment, the output has the 'Assigned to' comments instead.

I hope that I'm making sense and that someone can help me.

drew.ohara's picture
11
Aug
2008
0 Votes 0
Login to vote

Reporting on Incidents where owner changes more than 3 times

Unfortunately, no, because the current view only holds the current info. of an incident. If you want to see past assigned queues you need to use the detail view. You would need a "Join" in the SQL to use the 2 databases. let me know if you need help with that