Skip to content

Commit

Permalink
Disable auto-claim on ticket reply & give the option of claiming
Browse files Browse the repository at this point in the history
  • Loading branch information
Mike Nahmias committed Apr 30, 2016
1 parent 9fc8e05 commit 2d9b76b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
3 changes: 2 additions & 1 deletion include/class.ticket.php
Original file line number Diff line number Diff line change
Expand Up @@ -1833,8 +1833,9 @@ function postReply($vars, &$errors, $alert = true) {
&& $vars['reply_status_id'] != $this->getStatusId())
$this->setStatus($vars['reply_status_id']);

//Only claim the ticket if the user chose to do so in the form
if($thisstaff && $this->isOpen() && !$this->getStaffId()
&& $cfg->autoClaimTickets())
&& $cfg->autoClaimTickets() && $vars['claim'] == 'claim')
$this->setStaffId($thisstaff->getId()); //direct assignment;

$this->onResponse(); //do house cleaning..
Expand Down
14 changes: 14 additions & 0 deletions include/staff/ticket-view.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -633,6 +633,20 @@ class="richtext ifhtml draft draft-delete"><?php
</select>
</td>
</tr>
<!--Only show the claim options if the ticket is not assigned to you-->
<?php if (strcmp($staff, $thisstaff)!= 0) { ?>
<tr>
<td width="120">
<label for="claim" class="left"><?php echo __('Claim on Reply?'); ?>:</label>
</td>
<td>
<label><input type="radio" name="claim" value="noclaim"
checked="checked"> <?php echo __('Don\'t Claim'); ?></label>
<label><input type="radio" name="claim" value="claim"> <?php echo __('Claim'); ?></label>

</td>
</tr>
<?php } ?>
</tbody>
</table>
<p style="padding:0 165px;">
Expand Down

0 comments on commit 2d9b76b

Please sign in to comment.