diff --git a/include/class.filter.php b/include/class.filter.php
index 0d9382771e518b2a2e979f2c388e717133cb7f10..4c36541e6e262f097d6e7989d0ee9148d6760496 100644
--- a/include/class.filter.php
+++ b/include/class.filter.php
@@ -123,6 +123,10 @@ class Filter {
         return $this->ht['canned_response_id'];
     }
 
+    function getHelpTopic() {
+        return $this->ht['topic_id'];
+    }
+
     function stopOnMatch() {
         return ($this->ht['stop_on_match']);
     }
@@ -309,6 +313,10 @@ class Filter {
         # Use canned response.
         if ($this->getCannedResponse())
             $ticket['cannedResponseId'] = $this->getCannedResponse();
+
+        # Apply help topic
+        if ($this->getHelpTopic())
+            $ticket['topicId'] = $this->getHelpTopic();
     }
     /* static */ function getSupportedMatches() {
         foreach (static::$match_types as $k=>&$v) {
@@ -498,6 +506,7 @@ class Filter {
             .',dept_id='.db_input($vars['dept_id'])
             .',priority_id='.db_input($vars['priority_id'])
             .',sla_id='.db_input($vars['sla_id'])
+            .',topic_id='.db_input($vars['topic_id'])
             .',match_all_rules='.db_input($vars['match_all_rules'])
             .',stop_onmatch='.db_input(isset($vars['stop_onmatch'])?1:0)
             .',reject_ticket='.db_input(isset($vars['reject_ticket'])?1:0)
diff --git a/include/staff/filter.inc.php b/include/staff/filter.inc.php
index 74e72106859d68501fbc6e490d79a9ddf90a4869..8590c914915618808cc8a4776e0cab3e5800d725 100644
--- a/include/staff/filter.inc.php
+++ b/include/staff/filter.inc.php
@@ -318,6 +318,26 @@ $info=Format::htmlchars(($errors && $_POST)?$_POST:$info);
                 &nbsp;<span class="error">&nbsp;<?php echo $errors['assign']; ?></span>
             </td>
         </tr>
+        <tr>
+            <td width="180">
+                Help Topic
+            </td>
+            <td>
+                <select name="topic_id">
+                    <option value="0" selected="selected">&mdash; Unchanged &mdash;</option>
+                    <?php
+                    $sql='SELECT topic_id, topic FROM '.TOPIC_TABLE.' T ORDER by topic';
+                    if(($res=db_query($sql)) && db_num_rows($res)){
+                        while(list($id,$name)=db_fetch_row($res)){
+                            $selected=($info['topic_id'] && $id==$info['topic_id'])?'selected="selected"':'';
+                            echo sprintf('<option value="%d" %s>%s</option>',$id,$selected,$name);
+                        }
+                    }
+                    ?>
+                </select>
+                &nbsp;<span class="error"><?php echo $errors['topic_id']; ?></span>
+            </td>
+        </tr>
         <tr>
             <th colspan="2">
                 <em><strong>Admin Notes</strong>: Internal notes.&nbsp;</em>