This commit is contained in:
tianshujie98
2021-06-01 15:52:10 +08:00
parent fbc5f1404e
commit 283683350d
6 changed files with 33 additions and 0 deletions
+2
View File
@@ -312,6 +312,8 @@ $lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
$lang->execution->errorNoLinkedProducts = "Kein verknüpftes {$lang->productCommon} in {$lang->executionCommon} gefunden. Sie werden auf die {$lang->productCommon} Seite geleitet.";
$lang->execution->errorSameProducts = "{$lang->executionCommon} Kann nicht mit mehreren identischen {$lang->productCommon} verknüpft werden";
$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s.";
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
$lang->execution->accessDenied = "Zugriff zu {$lang->executionCommon} verweigert!";
$lang->execution->tips = 'Hinweis';
$lang->execution->afterInfo = "{$lang->executionCommon} wurde erstellt. Als nächstes können Sie ";
+2
View File
@@ -312,6 +312,8 @@ $lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
$lang->execution->errorNoLinkedProducts = "No {$lang->productCommon} is linked to {$lang->executionCommon}. You will be directed to {$lang->productCommon} page to link one.";
$lang->execution->errorSameProducts = "{$lang->executionCommon} cannot be linked to the same {$lang->productCommon} twice.";
$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s.";
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!";
$lang->execution->tips = 'Note';
$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can ";
+2
View File
@@ -312,6 +312,8 @@ $lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
$lang->execution->errorNoLinkedProducts = "Aucun {$lang->productCommon} n'est associé à ce {$lang->executionCommon}. Vous allez être redirigé vers la page {$lang->productCommon} pour en associer un.";
$lang->execution->errorSameProducts = "Ce {$lang->executionCommon} ne peut pas être associé deux fois au même {$lang->productCommon}. Imaginez un peu les résultats !";
$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s.";
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
$lang->execution->accessDenied = "Votre accès au {$lang->executionCommon} est refusé ! Désolé.";
$lang->execution->tips = 'Note';
$lang->execution->afterInfo = "Le {$lang->executionCommon} a été créé avec succès ! Ensuite vous pouvez ";
+2
View File
@@ -312,6 +312,8 @@ $lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked
$lang->execution->notAllowRemoveProducts = "The story of this product is linked with the {$lang->executionCommon}. Unlink it before doing any action.";
$lang->execution->errorNoLinkedProducts = "Không có {$lang->productCommon} liên kết tới {$lang->executionCommon}. Bạn sẽ được chuyển tới trang {$lang->productCommon} để liên kết.";
$lang->execution->errorSameProducts = "{$lang->executionCommon} không thể liên kết tới {$lang->productCommon} giống nhau 2 lần.";
$lang->execution->errorBegin = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s.";
$lang->execution->errorEnd = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project.";
$lang->execution->accessDenied = "Truy cập của bạn tới {$lang->executionCommon} bị từ chối!";
$lang->execution->tips = 'Ghi chú';
$lang->execution->afterInfo = "{$lang->executionCommon} được tạo. Tiếp theo bạn có thể ";
+2
View File
@@ -312,6 +312,8 @@ $lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项
$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。";
$lang->execution->errorNoLinkedProducts = "该{$lang->executionCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面";
$lang->execution->errorSameProducts = "{$lang->executionCommon}不能关联多个相同的{$lang->productCommon}。";
$lang->execution->errorBegin = "{$lang->executionCommon}的开始时间不能小于所属项目的开始时间%s。";
$lang->execution->errorEnd = "{$lang->executionCommon}的结束时间不能大于所属项目的结束时间%s。";
$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!";
$lang->execution->tips = '提示';
$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:";
+23
View File
@@ -295,6 +295,17 @@ class executionModel extends model
/* Determine whether to add a sprint or a stage according to the model of the execution. */
$project = $this->loadModel('project')->getByID($_POST['project']);
if($_POST['begin'] < $project->begin and $this->config->systemMode == 'new')
{
dao::$errors['begin'] = sprintf($this->lang->execution->errorBegin, $project->begin);
return false;
}
if($_POST['end'] > $project->end and $this->config->systemMode == 'new')
{
dao::$errors['end'] = sprintf($this->lang->execution->errorEnd, $project->end);
return false;
}
$type = zget($this->config->execution->modelList, $project->model, 'sprint');
$this->config->execution->create->requiredFields .= ',project';
@@ -453,6 +464,18 @@ class executionModel extends model
->remove('products, branch, uid, plans')
->get();
$project = $this->dao->select('begin, end')->from(TABLE_PROJECT)->where('id')->eq($oldExecution->project)->fetch();
if($execution->begin < $project->begin and $this->config->systemMode == 'new')
{
dao::$errors['begin'] = sprintf($this->lang->execution->errorBegin, $project->begin);
return false;
}
if($execution->end > $project->end and $this->config->systemMode == 'new')
{
dao::$errors['end'] = sprintf($this->lang->execution->errorEnd, $project->end);
return false;
}
/* Child stage inherits parent stage permissions. */
if(!isset($execution->acl)) $execution->acl = $oldExecution->acl;
if($execution->acl == 'open') $execution->whitelist = '';