diff --git a/include/class.queue.php b/include/class.queue.php index 87f2850ef6405727798d026bef31eb6e48f758ba..6b4c1adc1cab13613ffd170f80a6d568e4cf5518 100644 --- a/include/class.queue.php +++ b/include/class.queue.php @@ -2001,7 +2001,16 @@ extends VerySimpleModel { // These getters fetch data from the annotated overlay from the // queue_column table function getQueue() { - return $this->_queue ?: $this->queue; + if (!isset($this->_queue)) { + $queue = $this->queue; + + if (!$queue && ($queue_id = $this->queue_id)) + $queue = CustomQueue::lookup($queue_id); + + $this->_queue = $queue; + } + + return $this->_queue; } /** * If a column is inherited into a child queue and there are conditions @@ -2248,7 +2257,7 @@ extends VerySimpleModel { if ($include_queue && ($q = $this->getQueue()) && ($q_conds = $q->getConditions()) ) { - $this->_conditions = array_merge($this->_conditions, $q_conds); + $this->_conditions = array_merge($q_conds, $this->_conditions); } } return $this->_conditions;