From dfbe7ad645ac654b13f02174e9f64caf285af13f Mon Sep 17 00:00:00 2001 From: zenggang Date: Fri, 3 Sep 2021 10:56:04 +0800 Subject: [PATCH] * Fix bug#14557 --- module/testtask/lang/de.php | 21 +++++++++++---------- module/testtask/lang/en.php | 21 +++++++++++---------- module/testtask/lang/fr.php | 21 +++++++++++---------- module/testtask/lang/vi.php | 21 +++++++++++---------- module/testtask/lang/zh-cn.php | 21 +++++++++++---------- module/testtask/model.php | 5 +++++ 6 files changed, 60 insertions(+), 50 deletions(-) diff --git a/module/testtask/lang/de.php b/module/testtask/lang/de.php index 8eaf57b0d4..04b650001b 100644 --- a/module/testtask/lang/de.php +++ b/module/testtask/lang/de.php @@ -124,16 +124,17 @@ $lang->testtask->fail = 'Fehlgeschlagen'; $lang->testtask->showResult = 'Ausführungen %s'; $lang->testtask->showFail = 'Fehlgeschlagen %s'; -$lang->testtask->confirmDelete = 'Möchten Sie dieses Build löschen?'; -$lang->testtask->confirmUnlinkCase = 'Möchten Sie die Verknüpfung zu dem Fall aufheben?'; -$lang->testtask->noticeNoOther = 'Es existieren keine weiteren Testaufgaben für dieses Produkt'; -$lang->testtask->noTesttask = 'Keine Testaufgaben. '; -$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->confirmDelete = 'Möchten Sie dieses Build löschen?'; +$lang->testtask->confirmUnlinkCase = 'Möchten Sie die Verknüpfung zu dem Fall aufheben?'; +$lang->testtask->noticeNoOther = 'Es existieren keine weiteren Testaufgaben für dieses Produkt'; +$lang->testtask->noTesttask = 'Keine Testaufgaben. '; +$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Meine'; $lang->testtask->allCases = 'Alle Fälle'; diff --git a/module/testtask/lang/en.php b/module/testtask/lang/en.php index 35c39caae2..986c3d97ed 100644 --- a/module/testtask/lang/en.php +++ b/module/testtask/lang/en.php @@ -127,16 +127,17 @@ $lang->testtask->fail = 'Failed'; $lang->testtask->showResult = 'Run %s times'; $lang->testtask->showFail = 'Failed %s times'; -$lang->testtask->confirmDelete = 'Do you want to delete this build?'; -$lang->testtask->confirmUnlinkCase = 'Do you want to unlink this case?'; -$lang->testtask->noticeNoOther = 'No test builds for this product.'; -$lang->testtask->noTesttask = 'No requests. '; -$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->confirmDelete = 'Do you want to delete this build?'; +$lang->testtask->confirmUnlinkCase = 'Do you want to unlink this case?'; +$lang->testtask->noticeNoOther = 'No test builds for this product.'; +$lang->testtask->noTesttask = 'No requests. '; +$lang->testtask->checkLinked = "Please check whether the product that the test request is linked to has been linked to a {$lang->executionCommon}."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'AssignedToMe'; $lang->testtask->allCases = 'All Cases'; diff --git a/module/testtask/lang/fr.php b/module/testtask/lang/fr.php index 8abb1a5ba7..06ed17d1a4 100644 --- a/module/testtask/lang/fr.php +++ b/module/testtask/lang/fr.php @@ -124,16 +124,17 @@ $lang->testtask->fail = 'Echec'; $lang->testtask->showResult = 'Jouée %s fois'; $lang->testtask->showFail = 'Echouée %s fois'; -$lang->testtask->confirmDelete = 'Voulez-vous supprimer ce build ?'; -$lang->testtask->confirmUnlinkCase = 'Voulez-vous détacher ce CasTest ?'; -$lang->testtask->noticeNoOther = "Il n'y a pas de Campagnes de Recette pour ce product."; -$lang->testtask->noTesttask = 'Pas de campagne. '; -$lang->testtask->checkLinked = "Vérifiez si le product auquel la campagne de recette est associée est bien lié à un projet."; -$lang->testtask->noImportData = "Le XML importé ne parse pas les données."; -$lang->testtask->unitXMLFormat = 'Veuillez sélectionner un fichier au format XML JUnit.'; -$lang->testtask->titleOfAuto = "%s tests automatisés"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->confirmDelete = 'Voulez-vous supprimer ce build ?'; +$lang->testtask->confirmUnlinkCase = 'Voulez-vous détacher ce CasTest ?'; +$lang->testtask->noticeNoOther = "Il n'y a pas de Campagnes de Recette pour ce product."; +$lang->testtask->noTesttask = 'Pas de campagne. '; +$lang->testtask->checkLinked = "Vérifiez si le product auquel la campagne de recette est associée est bien lié à un projet."; +$lang->testtask->noImportData = "Le XML importé ne parse pas les données."; +$lang->testtask->unitXMLFormat = 'Veuillez sélectionner un fichier au format XML JUnit.'; +$lang->testtask->titleOfAuto = "%s tests automatisés"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Affecté à Moi'; $lang->testtask->allCases = 'Tous les CasTests'; diff --git a/module/testtask/lang/vi.php b/module/testtask/lang/vi.php index d9fb36c564..2c5d58ab6c 100644 --- a/module/testtask/lang/vi.php +++ b/module/testtask/lang/vi.php @@ -124,16 +124,17 @@ $lang->testtask->fail = 'Thất bại'; $lang->testtask->showResult = 'Chạy %s lần'; $lang->testtask->showFail = 'Thất bại %s lần'; -$lang->testtask->confirmDelete = 'Bạn có muốn xóa bản dựng này?'; -$lang->testtask->confirmUnlinkCase = 'Bạn có muốn hủy liên kết tình huống này?'; -$lang->testtask->noticeNoOther = 'Không có test builds cho sản phẩm này.'; -$lang->testtask->noTesttask = 'Không có yêu cầu. '; -$lang->testtask->checkLinked = "Vui lòng kiểm tra sản phẩm đó mà yêu cầu test này là liên kết tới một dự án."; -$lang->testtask->noImportData = 'The imported XML does not parse the data.'; -$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; -$lang->testtask->titleOfAuto = "%s automated testing"; -$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; -$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->confirmDelete = 'Bạn có muốn xóa bản dựng này?'; +$lang->testtask->confirmUnlinkCase = 'Bạn có muốn hủy liên kết tình huống này?'; +$lang->testtask->noticeNoOther = 'Không có test builds cho sản phẩm này.'; +$lang->testtask->noTesttask = 'Không có yêu cầu. '; +$lang->testtask->checkLinked = "Vui lòng kiểm tra sản phẩm đó mà yêu cầu test này là liên kết tới một dự án."; +$lang->testtask->noImportData = 'The imported XML does not parse the data.'; +$lang->testtask->unitXMLFormat = 'Please select a file in JUnit XML format.'; +$lang->testtask->titleOfAuto = "%s automated testing"; +$lang->testtask->cannotBeParsed = 'The content of the imported XML file is in the wrong format and cannot be parsed.'; +$lang->testtask->finishedDateError = 'Actual Finished Date cannot be <= Begin Date %s'; +$lang->testtask->finishedDateError2 = 'Actual Finished Date cannot be > Today'; $lang->testtask->assignedToMe = 'Giao cho bạn'; $lang->testtask->allCases = 'Tất cả tình huống'; diff --git a/module/testtask/lang/zh-cn.php b/module/testtask/lang/zh-cn.php index f1bbbf12b3..6311af393b 100644 --- a/module/testtask/lang/zh-cn.php +++ b/module/testtask/lang/zh-cn.php @@ -127,16 +127,17 @@ $lang->testtask->fail = '失败'; $lang->testtask->showResult = '共执行%s次'; $lang->testtask->showFail = '失败%s次'; -$lang->testtask->confirmDelete = '您确认要删除该测试单吗?'; -$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; -$lang->testtask->noticeNoOther = '该产品还没有其他测试单'; -$lang->testtask->noTesttask = '暂时没有测试单。'; -$lang->testtask->checkLinked = "请检查测试单的产品是否与{$lang->executionCommon}相关联"; -$lang->testtask->noImportData = '导入的XML没有解析出数据。'; -$lang->testtask->unitXMLFormat = '请选择Junit XML 格式的文件。'; -$lang->testtask->titleOfAuto = "%s 自动化测试"; -$lang->testtask->cannotBeParsed = '导入的XML文件内容格式错误,无法解析。'; -$lang->testtask->finishedDateError = '实际完成日期不能小于开始日期%s'; +$lang->testtask->confirmDelete = '您确认要删除该测试单吗?'; +$lang->testtask->confirmUnlinkCase = '您确认要移除该用例吗?'; +$lang->testtask->noticeNoOther = '该产品还没有其他测试单'; +$lang->testtask->noTesttask = '暂时没有测试单。'; +$lang->testtask->checkLinked = "请检查测试单的产品是否与{$lang->executionCommon}相关联"; +$lang->testtask->noImportData = '导入的XML没有解析出数据。'; +$lang->testtask->unitXMLFormat = '请选择Junit XML 格式的文件。'; +$lang->testtask->titleOfAuto = "%s 自动化测试"; +$lang->testtask->cannotBeParsed = '导入的XML文件内容格式错误,无法解析。'; +$lang->testtask->finishedDateError = '实际完成日期不能小于开始日期%s'; +$lang->testtask->finishedDateError2 = '实际完成日期不能大于今天'; $lang->testtask->assignedToMe = '指派给我'; $lang->testtask->allCases = '所有用例'; diff --git a/module/testtask/model.php b/module/testtask/model.php index 6bb15e59b9..6cffe05004 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -806,6 +806,11 @@ class testtaskModel extends model dao::$errors[] = sprintf($this->lang->testtask->finishedDateError, $oldTesttask->begin); return false; } + if($testtask->realFinishedDate > date("Y-m-d 00:00:00", strtotime("+1 day"))) + { + dao::$errors[] = $this->lang->testtask->finishedDateError2; + return false; + } $testtask = $this->loadModel('file')->processImgURL($testtask, $this->config->testtask->editor->close['id'], $this->post->uid); $this->dao->update(TABLE_TESTTASK)->data($testtask)