When using the New Ticket form (open.php) to open a new ticket, Help Topics in the form are displayed in lexicographic order. I wanted to display these in arbitrary order so that "Other", for example, would always be the last help topic.
How to do it:
1. Change 1 line in include/client/open.inc.php
Old line:
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY topic');
New line:
$services= db_query('SELECT topic_id,topic FROM '.TOPIC_TABLE.' WHERE isactive=1 ORDER BY display_order');
2. Add 1 column to the ost_help_topic table:
ALTER TABLE `ost_help_topic` ADD `display_order` TINYINT( 3 ) NOT NULL AFTER `topic`
3. Define the order in which help topics are displayed in the New Ticket form by setting a numeric value (0-127) for the display_order column of each row in ost_help_topic. I suggest using a step interval between values (e.g., 1 then 10 then 20 then 30, etc) so that new help topics can be more easily displayed in arbitrary order. If you use values 1, 2, 3, etc., then later add new help topics, you'll have to re-order all help topics if the new one is to be displayed anywhere but at the end.
Hope this helps someone,
Eric Jung
Released under the same license(s) osTicket itself is released under