* Fix bug #37285.
This commit is contained in:
@@ -606,7 +606,7 @@ class bugModel extends model
|
||||
* @access public
|
||||
* @return array
|
||||
*/
|
||||
public function getActiveBugs($products, $branch, $executions, $excludeBugs, $pager = null)
|
||||
public function getActiveBugs($products, $branch, $executions, $excludeBugs, $pager = null, $orderBy = 'id desc')
|
||||
{
|
||||
return $this->dao->select('*')->from(TABLE_BUG)
|
||||
->where('status')->eq('active')
|
||||
@@ -617,7 +617,7 @@ class bugModel extends model
|
||||
->beginIF(!empty($executions))->andWhere('execution')->in($executions)->fi()
|
||||
->beginIF($excludeBugs)->andWhere('id')->notIN($excludeBugs)->fi()
|
||||
->andWhere('deleted')->eq(0)
|
||||
->orderBy('id desc')
|
||||
->orderBy($orderBy)
|
||||
->page($pager)
|
||||
->fetchAll();
|
||||
}
|
||||
|
||||
@@ -652,7 +652,7 @@ class mr extends control
|
||||
$linkedStories = $this->mr->getLinkList($MRID, $product->id, 'story');
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allStories = $this->story->getBySearch($productID, 0, $queryID, 'id', '', 'story', array_keys($linkedStories), '', $pager);
|
||||
$allStories = $this->story->getBySearch($productID, 0, $queryID, $orderBy, '', 'story', array_keys($linkedStories), '', $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -741,17 +741,13 @@ class mr extends control
|
||||
$linkedBugs = $this->mr->getLinkList($MRID, $product->id, 'bug');
|
||||
if($browseType == 'bySearch')
|
||||
{
|
||||
$allBugs = $this->bug->getBySearch($productID, 0, $queryID, 'id_desc', array_keys($linkedBugs), $pager);
|
||||
$allBugs = $this->bug->getBySearch($productID, 0, $queryID, $orderBy, array_keys($linkedBugs), $pager);
|
||||
}
|
||||
else
|
||||
{
|
||||
$allBugs = $this->bug->getActiveBugs($productID, 0, '0', array_keys($linkedBugs), $pager);
|
||||
$allBugs = $this->bug->getActiveBugs($productID, 0, '0', array_keys($linkedBugs), $pager, $orderBy);
|
||||
}
|
||||
|
||||
list($order, $sort) = explode('_', $orderBy);
|
||||
$sortCol = array_column($allBugs, $order);
|
||||
array_multisort($sortCol, $sort == 'asc' ? SORT_ASC : SORT_DESC, $allBugs);
|
||||
|
||||
$this->view->modules = $modules;
|
||||
$this->view->users = $this->loadModel('user')->getPairs('noletter');
|
||||
$this->view->allBugs = $allBugs;
|
||||
|
||||
@@ -1,2 +1,3 @@
|
||||
.mr-linkstory-title {background-color: #e6f0ff; color: #2e7fff; padding: 12px 6px 12px;}
|
||||
#log .action-btn .caret {display: none; color: red}
|
||||
#log .action-btn .caret {display: none; color: red}
|
||||
.dropmenu-btn>.text {max-width: 280px;}
|
||||
@@ -3,7 +3,7 @@ window.createSortLink = function(col)
|
||||
var sort = col.name + '_asc';
|
||||
if(sort == orderBy) sort = col.name + '_desc';
|
||||
|
||||
return sortLink.replace('{orderBy}', sort);
|
||||
return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-bug')";
|
||||
}
|
||||
|
||||
$(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e)
|
||||
|
||||
@@ -3,7 +3,7 @@ window.createSortLink = function(col)
|
||||
var sort = col.name + '_asc';
|
||||
if(sort == orderBy) sort = col.name + '_desc';
|
||||
|
||||
return sortLink.replace('{orderBy}', sort);
|
||||
return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-story')";
|
||||
}
|
||||
|
||||
$(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e)
|
||||
|
||||
@@ -3,7 +3,7 @@ window.createSortLink = function(col)
|
||||
var sort = col.name + '_asc';
|
||||
if(sort == orderBy) sort = col.name + '_desc';
|
||||
|
||||
return sortLink.replace('{orderBy}', sort);
|
||||
return "javascript:loadTarget('" + sortLink.replace('{orderBy}', sort) + "', 'mr-task')";
|
||||
}
|
||||
|
||||
$(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer .batch-btn', function(e)
|
||||
|
||||
+1
-1
@@ -1973,7 +1973,7 @@ class mrModel extends model
|
||||
{
|
||||
$product = array();
|
||||
|
||||
if($MR->repoID)
|
||||
if(is_object($MR) && $MR->repoID)
|
||||
{
|
||||
$productID = $this->dao->select('product')->from(TABLE_REPO)->where('id')->eq($MR->repoID)->fetch('product');
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$lang->ops->common = 'devops设置';
|
||||
$lang->ops->common = 'DevOps设置';
|
||||
$lang->ops->setting = '设置';
|
||||
$lang->ops->provider = '服务商';
|
||||
$lang->ops->provider = '服务商';
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
<?php
|
||||
$lang->ops->common = 'devops设置';
|
||||
$lang->ops->common = 'DevOps设置';
|
||||
$lang->ops->setting = '设置';
|
||||
$lang->ops->provider = '服务商';
|
||||
$lang->ops->provider = '服务商';
|
||||
|
||||
@@ -1221,7 +1221,7 @@ class repo extends control
|
||||
}
|
||||
else
|
||||
{
|
||||
$allBugs = $this->bug->getActiveBugs($product->id, 0, '0', array_keys($linkedBugs), $pager);
|
||||
$allBugs = $this->bug->getActiveBugs($product->id, 0, '0', array_keys($linkedBugs), $pager, $orderBy);
|
||||
}
|
||||
|
||||
foreach($allBugs as $bug) $bug->statusText = $this->processStatus('bug', $bug);
|
||||
|
||||
@@ -21,10 +21,3 @@ $(document).off('click','.dtable-footer .batch-btn').on('click', '.dtable-footer
|
||||
data: postData
|
||||
});
|
||||
});
|
||||
|
||||
$('#table-repo-linkstory').on('click', 'a', function(e)
|
||||
{
|
||||
console.log(1111, e);
|
||||
e.preventDefault();
|
||||
return;
|
||||
})
|
||||
Reference in New Issue
Block a user