diff --git a/include/class.staff.php b/include/class.staff.php index ee930e5810866ab04a14ea0e7156f52fb39642e8..2a7bca5f666b9001a376678cfe05e2924653b3f7 100644 --- a/include/class.staff.php +++ b/include/class.staff.php @@ -615,7 +615,7 @@ implements AuthenticatedUser, EmailContact, TemplateVariable { $this->signature = Format::sanitize($vars['signature']); $this->timezone = $vars['timezone']; $this->locale = $vars['locale']; - $this->show_assigned_tickets = isset($vars['show_assigned_tickets'])?1:0; + $this->show_assigned_tickets = isset($vars['hide_assigned_tickets'])?0:1; $this->max_page_size = $vars['max_page_size']; $this->auto_refresh_rate = $vars['auto_refresh_rate']; $this->default_signature_type = $vars['default_signature_type']; diff --git a/include/staff/profile.inc.php b/include/staff/profile.inc.php index 85a7a1338fe16f097c3dee80f88fe85886982819..d55e0c0e9cf9f112e12d306c9a7cf59964e65d79 100644 --- a/include/staff/profile.inc.php +++ b/include/staff/profile.inc.php @@ -132,14 +132,13 @@ if ($avatar->isChangeable()) { ?> </tr> <tr> <td colspan="2"> - <label> - <input type="checkbox" name="show_assigned_tickets" - <?php echo ($staff->show_assigned_tickets) ? 'checked="checked"' : ''; ?> /> - <?php echo __('Show assigned tickets on open queue.'); ?> - </label> + <label class="checkbox"> + <input type="checkbox" name="hide_assigned_tickets" + <?php echo (!$staff->show_assigned_tickets) ? 'checked="checked"' : ''; ?> /> + <?php echo __('Exclude assigned tickets on open queue.'); ?> <i class="help-tip icon-question-sign" href="#show_assigned_tickets"></i> - <br/> - <label> + </label> + <label class="checkbox"> <input type="checkbox" name="onvacation" <?php echo ($staff->onvacation) ? 'checked="checked"' : ''; ?> /> <?php echo __('Vacation Mode'); ?> diff --git a/include/staff/tickets.inc.php b/include/staff/tickets.inc.php index 063feee30cd8e662fe4e1b480c65db634c7bc6c1..d74dfc7c0b14ad9afca5a38eaf74fa8ea4346bbb 100644 --- a/include/staff/tickets.inc.php +++ b/include/staff/tickets.inc.php @@ -40,7 +40,7 @@ case 'closed': $status='closed'; $results_type=__('Closed Tickets'); $showassigned=true; //closed by. - $tickets->values('staff__firstname', 'staff__lastname', 'team__name', 'team_id'); + $tickets->values('staff__firstname', 'staff__lastname', 'team__name'); $queue_sort_options = array('closed', 'priority,due', 'due', 'priority,updated', 'priority,created', 'answered', 'number', 'hot'); break; @@ -146,19 +146,25 @@ case 'search': case 'open': $status='open'; $results_type=__('Open Tickets'); - $showassigned = ($cfg && $cfg->showAssignedTickets()) || $thisstaff->showAssignedTickets(); if (!$cfg->showAnsweredTickets()) $tickets->filter(array('isanswered'=>0)); - if (!$showassigned) - $tickets->filter(Q::any(array('staff_id'=>0, 'team_id'=>0))); - else - $tickets->values('staff__firstname', 'staff__lastname', 'team__name'); $queue_sort_options = array('priority,updated', 'updated', 'priority,due', 'due', 'priority,created', 'answered', 'number', 'hot'); break; } +// Open queues _except_ assigned should respect showAssignedTickets() +// settings +if ($status == 'open' && $queue_name != 'assigned') { + $hideassigned = ($cfg && !$cfg->showAssignedTickets()) || !$thisstaff->showAssignedTickets(); + $showassigned = !$hideassigned; + if ($hideassigned) + $tickets->filter(Q::any(array('staff_id'=>0, 'team_id'=>0))); + else + $tickets->values('staff__firstname', 'staff__lastname', 'team__name'); +} + // Apply primary ticket status if ($status) $tickets->filter(array('status__state'=>$status)); diff --git a/scp/css/scp.css b/scp/css/scp.css index 12389fb2660b96b1adcc3e97199fd26bae6e3f7c..f0624c0e7f3e4c9dbdaed4b78623b45b95e2d886 100644 --- a/scp/css/scp.css +++ b/scp/css/scp.css @@ -1412,6 +1412,7 @@ i.help-tip { vertical-align: inherit; color: #aaa; opacity: 0.8; + text-indent: initial; } i.help-tip:hover { color: orange !important;