Helpdesk Solution - Sorting Quick Incidents List

Helpdesk Solution - Sorting Quick Incidents List
Dominique's picture

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

3.166665
Average: 3.2 (30 votes)

Sorting Lists

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?

Sorting Lists

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.

Which criteria do you want

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

What I'm looking for

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.

1. to get the list of

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

to
Quote:

Select * from worker_query order by name

and

"WorkerQueryViewList" from

Quote:

select * from worker_query_view

to
Quote:

select * from worker_query_view order by worker_query_name

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