diff --git a/include/class.queue.php b/include/class.queue.php index 8bf73879a5c4999f5fb4af535922f5dcb91f584e..510b4c466f578fbaaa343dcd597f65601ac34827 100644 --- a/include/class.queue.php +++ b/include/class.queue.php @@ -194,7 +194,12 @@ class CustomQueue extends SavedSearch { } function getQuickFilterField($value=null) { - if ($this->filter + if ($this->filter == '::') { + if ($this->parent) { + return $this->parent->getQuickFilterField($value); + } + } + elseif ($this->filter && ($fields = SavedSearch::getSearchableFields($this->getRoot())) && (list(,$f) = @$fields[$this->filter]) && $f->supportsQuickFilter() diff --git a/include/class.search.php b/include/class.search.php index 06a728424e88ee430a659a56cf186a3dc5877c35..6626f1225cbef8a107c73caa38acd885c6a4fe7c 100644 --- a/include/class.search.php +++ b/include/class.search.php @@ -1107,11 +1107,11 @@ class SavedSearch extends VerySimpleModel { } protected function hasFlag($flag) { - return $this->get('flags') & $flag !== 0; + return $this->flags & $flag !== 0; } protected function clearFlag($flag) { - return $this->set('flags', $this->get('flag') & ~$flag); + return $this->flags &= ~$flag; } protected function setFlag($flag, $value=true) { diff --git a/include/staff/queue.inc.php b/include/staff/queue.inc.php index 47df03bfb6f7288d6b5d74c847cd46eb61f3e9d6..3cc19582d28ab3ae2d7e9a9337fa6faea4c08af6 100644 --- a/include/staff/queue.inc.php +++ b/include/staff/queue.inc.php @@ -89,7 +89,13 @@ else { <div><strong><?php echo __("Quick Filter"); ?></strong></div> <hr/> <select name="filter"> - <option value="::">— <?php echo __('Inherit from parent'); ?> —</option> + <option value="" <?php if ($queue->filter == "") + echo 'selected="selected"'; ?>>— <?php echo __('None'); ?> —</option> + <option value="::" <?php if ($queue->filter == "::") + echo 'selected="selected"'; ?>>— <?php echo __('Inherit from parent'); + if ($queue->parent + && ($qf = $queue->parent->getQuickFilterField())) + echo sprintf(' (%s)', $qf->getLabel()); ?> —</option> <?php foreach (SavedSearch::getSearchableFields('Ticket') as $path=>$f) { list($label, $field) = $f; if (!$field->supportsQuickFilter())