* [bug#35505,done,1h] Adjust required tips.

This commit is contained in:
daitingting
2024-08-22 13:33:09 +08:00
committed by 綦新志
parent 2d80d8bccf
commit dc370ee5cc
6 changed files with 28 additions and 16 deletions
+17 -16
View File
@@ -47,6 +47,22 @@ class build extends control
*/
public function create(int $executionID = 0, int $productID = 0, int $projectID = 0)
{
$this->loadModel('execution');
$this->loadModel('project');
/* Set menu. */
if($this->app->tab == 'project')
{
$this->project->setMenu($projectID);
}
elseif(in_array($this->app->tab, array('execution', 'qa')))
{
$execution = $this->execution->getByID($executionID);
$projectID = $execution ? $execution->project : 0;
}
if($this->app->tab == 'execution') $this->execution->setMenu($executionID);
if(!empty($_POST))
{
$build = form::data()->setDefault('createdBy', $this->app->user->account)->get();
@@ -64,24 +80,9 @@ class build extends control
return $this->sendSuccess(array('load' => $this->createLink($this->app->rawModule, 'view', "buildID=$buildID"), 'id' => $buildID));
}
$status = empty($this->config->CRProduct) ? 'noclosed' : '';
$this->loadModel('execution');
$this->loadModel('project');
/* Set menu. */
if($this->app->tab == 'project')
{
$this->project->setMenu($projectID);
}
elseif(in_array($this->app->tab, array('execution', 'qa')))
{
$execution = $this->execution->getByID($executionID);
$projectID = $execution ? $execution->project : 0;
}
if($this->app->tab == 'execution') $this->execution->setMenu($executionID);
if(in_array($this->app->tab, array('execution', 'project'))) $this->session->set('project', $projectID);
$status = empty($this->config->CRProduct) ? 'noclosed' : '';
$this->buildZen->assignCreateData($productID, $executionID, $projectID, $status);
}
+3
View File
@@ -42,6 +42,9 @@ class projectBuild extends control
{
$executionID = 0;
$project = $this->loadModel('project')->fetchById($projectID);
if($project->model == 'waterfall') $this->lang->projectbuild->execution = $this->lang->project->stage;
if(strpos('stage,sprint,kanban', $project->type) !== false)
{
$executionID = $projectID;
+2
View File
@@ -23,6 +23,8 @@ $lang->projectbuild->batchUnlink = 'Batch Unlink';
$lang->projectbuild->batchUnlinkStory = "Batch Unlink {$lang->SRCommon}";
$lang->projectbuild->batchUnlinkBug = 'Batch Unlink Bug';
$lang->projectbuild->name = 'Name';
$lang->projectbuild->execution = $lang->executionCommon;
$lang->projectbuild->product = $lang->productCommon;
$lang->projectbuild->scmPath = 'SCM Path';
$lang->projectbuild->filePath = 'File Path';
$lang->projectbuild->desc = 'Description';
+2
View File
@@ -23,6 +23,8 @@ $lang->projectbuild->batchUnlink = 'Batch Unlink';
$lang->projectbuild->batchUnlinkStory = "Batch Unlink {$lang->SRCommon}";
$lang->projectbuild->batchUnlinkBug = 'Batch Unlink Bug';
$lang->projectbuild->name = 'Name';
$lang->projectbuild->execution = $lang->executionCommon;
$lang->projectbuild->product = $lang->productCommon;
$lang->projectbuild->scmPath = 'SCM Path';
$lang->projectbuild->filePath = 'File Path';
$lang->projectbuild->desc = 'Description';
+2
View File
@@ -23,6 +23,8 @@ $lang->projectbuild->batchUnlink = 'Batch Unlink';
$lang->projectbuild->batchUnlinkStory = "Batch Unlink {$lang->SRCommon}";
$lang->projectbuild->batchUnlinkBug = 'Batch Unlink Bug';
$lang->projectbuild->name = 'Name';
$lang->projectbuild->execution = $lang->executionCommon;
$lang->projectbuild->product = $lang->productCommon;
$lang->projectbuild->scmPath = 'SCM Path';
$lang->projectbuild->filePath = 'File Path';
$lang->projectbuild->desc = 'Description';
+2
View File
@@ -23,6 +23,8 @@ $lang->projectbuild->batchUnlink = '批量移除';
$lang->projectbuild->batchUnlinkStory = "批量移除{$lang->SRCommon}";
$lang->projectbuild->batchUnlinkBug = '批量移除Bug';
$lang->projectbuild->name = '名称编号';
$lang->projectbuild->execution = $lang->executionCommon;
$lang->projectbuild->product = '所属' . $lang->productCommon;
$lang->projectbuild->scmPath = '源代码地址';
$lang->projectbuild->filePath = '下载地址';
$lang->projectbuild->desc = '描述';