This is fun, if your staff use the Help-Topic for task delegation or ticket prioritization, then this will help.
First, you need to add a column to the TOPIC_TABLE, I used help_topic_id:
(Change the ost bit to whatever your PREFIX is)
ALTER TABLE `ost_filter`ADD `help_topic_id` int(11)
Open: /include/staff/filter.inc.php
find:
<strong>Disable</strong> auto-response. <em>(Overwrites Dept. settings)</em>
</td>
</tr>
Add after:
<tr>
<td width="180">
Specify Help-Topic:
</td>
<td>
<select name="help_topic_id">
<option value="">— None —</option>
<?php
$sql='SELECT topic_id,topic FROM '. TOPIC_TABLE
.' WHERE isactive ORDER by topic';
if ($res=db_query($sql)) {
while (list($id,$title)=db_fetch_row($res)) {
$selected=($info &&
$id==$info)
? 'selected="selected"' : '';
echo sprintf('<option value="%d" %s>%s</option>',
$id, $selected, $title);
}
}
?>
</select>
<em>(Automatically assign a Help-Topic)</em>
</td>
</tr>
Open: /include/class.filter.php
find
function getCannedResponse() {
return $this->ht;
}
Add below
function getHelpTopic() {
return $this->ht;
}
Find
# Use canned response.
if ($this->getCannedResponse())
$ticket = $this->getCannedResponse();
Add below
# Set Help-Topic
if ($this->getHelpTopic()) $ticket = $this->getHelpTopic();
Find:
.',canned_response_id='.db_input($vars)
Add below
.',help_topic_id='.db_input($vars)
As always, input/comments welcome!