Video Screencast Help
Protect Your POS Environment Against Retail Data Breaches. Learn More.
Endpoint Management Community Blog

Helpdesk Solution - Sorting Quick Incidents List

Created: 14 Jul 2008 • 6 comments
Dominique's picture
0 0 Votes
Login to vote

You could sort the Worker Quick Incidents List but it will be temporary only as any upgrade, hotfix will overwrite the change. You will need to do it again on the new version, hotfixes, upgrades, repair, etc...

**** MAKE A BACKUP OF YOUR ALTIRIS_INCIDENTS DATABASE ***

You need to change the queries:
QuickIncidentListAll
QuickIncidentList

They are in the table Query in the database Altiris_incidents.

Change QuickIncidentListAll:

SELECT * FROM quick_incident 

to

SELECT * FROM quick_incident ORDER BY quick_incident_name 

And change QuickIncidentList

SELECT * FROM quick_incident where quick_incident_status = 'a' 

to

SELECT * FROM quick_incident where quick_incident_status = 'a' ORDER BY quick_incident_name 

Restart MSSQLSERVER service.
Wait 1 min.
Restart IIS
Wait 1 min.

Thanks,
Dom

Comments 6 CommentsJump to latest comment

drew.ohara's picture

I have created the quick incidents in a specific order that wouldn't work if it was automatically alphabetized. I am interested though in having the queries automatically organize themselves. I checked out the Query table but didn't see anything for the actual Queries. Any ideas?

-2
Login to vote
JLAbuhl's picture

If you're looking for the Non-Standard queries that you and your co-workers have created, they are located in the Worker_Query table (Altiris_Incidents DB). It lists the queries, who created them (by worker_id), last time modified, the expression...etc.

0
Login to vote
Dominique's picture

Do you want to order the quick incidents or the incidents?
Which criteria do you want to use to display them?
Is it for example "list of open incidents"?

Quick Incidents are created in the table quick_incidents.
The queries used to display them are in the query table.
To order the quick incidents list you need to order the queries in side the query table.
If you need to sort them on another criteria you need to use one of the fields
- already there like created_on if you want to keeo the original order you input them.
- you add a new field to the query table like 'ordinal' and set this field to match the order you need.

For the queries attached to the workers you will need to add the order statement in the worker_query table as stated in the previous post done by JLAbuhl

The two tables have different usage:
- quick incident is from the flyout menu
- queries are for the dropdown list for example

Dom

Dom

+4
Login to vote
drew.ohara's picture

Thanks for the replies. I'm looking for the query table for the Shared Queries so I can order them by name. I can get all the info about the queries, I just need the query table to sort them.

0
Login to vote
Dominique's picture

1. to get the list of queries you need to update run:

Select * from query
where expression like '%worker_query%'

You should get 4 queries two od them are already ordered:
WorkerQueryList
WorkerQueryWorkitemList

You need to update
"WorkerQuery" from
[quote]
Select * from worker_query
[/quote]
to
[quote]
Select * from worker_query order by name
[/quote]

and

"WorkerQueryViewList" from
[quote]
select * from worker_query_view
[/quote]
to
[quote]
select * from worker_query_view order by worker_query_name
[/quote]

These are customizations you will losse during:
- Repair
- NSSetup
- Upgrade
etc...

BE SURE TO CHECK THEM ANYTIME YOU DO SOMETHING!!!!

Restart SQL
Restart IIS

Thanks
Dom

Dom

0
Login to vote
drew.ohara's picture

Thanks Dom, this is very nice, saves me a ton of time.

something to remember though for everyone. When setting a new expression, don't forget to modify the expression to use the parenthesis if you have a WHERE statement like for the quick incidents. You really only need to do this if you are creating a query to update the row ... if you are manually typing this into the DataBase, you don't need to.

Example:
Dom has it listed as:
SELECT * FROM quick_incident where quick_incident_status = 'a' ORDER BY quick_incident_name

To make it work I had to change it to use the parenthesis instead of the single quotes:
SELECT * FROM quick_incident where quick_incident_status = (a) ORDER BY quick_incident_name

using the single quotes doesn't allow you to run the query to set the new expression

-2
Login to vote