* [misc] Adjust order by status.
This commit is contained in:
@@ -1031,6 +1031,7 @@ class bugModel extends model
|
||||
|
||||
if(strpos($orderBy, 'pri_') !== false) $orderBy = str_replace('pri_', 'priOrder_', $orderBy);
|
||||
if(strpos($orderBy, 'severity_') !== false) $orderBy = str_replace('severity_', 'severityOrder_', $orderBy);
|
||||
if(strpos($orderBy, 'status') !== false) $orderBy = str_replace('status', 'statusOrder', $orderBy);
|
||||
|
||||
$type = strtolower($type);
|
||||
if($type == 'bysearch')
|
||||
@@ -1051,7 +1052,7 @@ class bugModel extends model
|
||||
$condition = "($condition)";
|
||||
}
|
||||
|
||||
$bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) AS priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) AS severityOrder")->from(TABLE_BUG)->alias('t1')
|
||||
$bugs = $this->dao->select("t1.*, IF(t1.`pri` = 0, {$this->config->maxPriValue}, t1.`pri`) AS priOrder, IF(t1.`severity` = 0, {$this->config->maxPriValue}, t1.`severity`) AS severityOrder, INSTR('active,resolved,closed,', t1.status) as statusOrder")->from(TABLE_BUG)->alias('t1')
|
||||
->leftJoin(TABLE_MODULE)->alias('t2')->on('t1.module = t2.id')
|
||||
->where('t1.deleted')->eq('0')
|
||||
->beginIF(!empty($productID) && $branchID !== 'all')->andWhere('t1.branch')->eq($branchID)->fi()
|
||||
|
||||
Reference in New Issue
Block a user