title: how to Set default department according to staff department on osticket system
body: <p>Is there a simple way to set the Department to a default when creating a new ticket in the Staff interface according to staff department on osticket system? </p>
  
  <p>here is the original code of newticket.php  </p>
  
  <pre><code>&lt;td align="left"&gt;&lt;b&gt;Departement&lt;/b&gt;&lt;/td&gt;
      &lt;td&gt;
          &lt;select name="deptId"&gt;
              &lt;option value="" selected &gt;Select Department&lt;/option&gt;
              &lt;?
               $services= db_query('SELECT dept_id,dept_name FROM '.DEPT_TABLE.' ORDER BY dept_name');
               while (list($deptId,$dept) = db_fetch_row($services)){
  
                  $selected = ($info['deptId']==$deptId)?'selected':''; ?&gt;
                  &lt;option value="&lt;?=$deptId?&gt;"&lt;?=$selected?&gt;&gt;&lt;?=$dept?&gt;&lt;/option&gt;
              &lt;?
              }?&gt;
          &lt;/select&gt;
          &amp;nbsp;&lt;font class="error"&gt;&lt;b&gt;*&lt;/b&gt;&amp;nbsp;&lt;?=$errors['deptId']?&gt;&lt;/font&gt;
      &lt;/td&gt;
  </code></pre>
  
  <p>any help will be appreciated</p>
  
  <p>clarification:
  the original code of osticket system when create a new ticket, the staff have an options to choose department even not their department. here is the <a href="http://i.stack.imgur.com/OX3ms.jpg" rel="nofollow">screenshot</a> </p>
  
  <p>my questions is it possible to set department automatically when created  new ticket?
  for example staff A on accounting department, so when staff A open new ticket they don't need to select department anymore.it will be automatic store as accounting dept.. i hope this is more clearly...</p>