* merge after 12.4.1 changes.

This commit is contained in:
z
2020-08-31 15:31:55 +08:00
parent ba32604be6
commit a9df6f3b9c
55 changed files with 364 additions and 146 deletions
+18 -6
View File
@@ -148,8 +148,9 @@ class bug extends control
$storyIdList = $taskIdList = array();
foreach($bugs as $bug)
{
if($bug->story) $storyIdList[$bug->story] = $bug->story;
if($bug->task) $taskIdList[$bug->task] = $bug->task;
if($bug->story) $storyIdList[$bug->story] = $bug->story;
if($bug->task) $taskIdList[$bug->task] = $bug->task;
if($bug->toTask) $taskIdList[$bug->toTask] = $bug->toTask;
}
$storyList = $storyIdList ? $this->loadModel('story')->getByList($storyIdList) : array();
$taskList = $taskIdList ? $this->loadModel('task')->getByList($taskIdList) : array();
@@ -1492,10 +1493,11 @@ class bug extends control
* @param string $productID
* @param string $orderBy
* @param string $browseType
* @param int $projectID
* @access public
* @return void
*/
public function export($productID, $orderBy, $browseType = '')
public function export($productID, $orderBy, $browseType = '', $projectID = 0)
{
if($_POST)
{
@@ -1673,10 +1675,20 @@ class bug extends control
}
$fileName = $this->lang->bug->common;
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
$browseType = isset($this->lang->bug->featureBar['browse'][$browseType]) ? $this->lang->bug->featureBar['browse'][$browseType] : zget($this->lang->bug->moreSelects, $browseType, '');
if($projectID)
{
$projectName = $this->dao->findById($projectID)->from(TABLE_PROJECT)->fetch('name');
$fileName = $projectName . $this->lang->dash . $fileName;
}
else
{
$productName = $this->dao->findById($productID)->from(TABLE_PRODUCT)->fetch('name');
$browseType = isset($this->lang->bug->featureBar['browse'][$browseType]) ? $this->lang->bug->featureBar['browse'][$browseType] : zget($this->lang->bug->moreSelects, $browseType, '');
$this->view->fileName = $productName . $this->lang->dash . $browseType . $fileName;
$fileName = $productName . $this->lang->dash . $browseType . $fileName;
}
$this->view->fileName = $fileName;
$this->view->allExportFields = $this->config->bug->list->exportFields;
$this->view->customExport = true;
$this->display();