This commit is contained in:
tianshujie
2022-04-20 10:57:00 +08:00
parent 524a2214ab
commit 0c55baddc6
5 changed files with 11 additions and 8 deletions
+1 -1
View File
@@ -8816,7 +8816,7 @@ ALTER TABLE `zt_story` ADD `fromStory` mediumint(8) unsigned NOT NULL default 0
ALTER TABLE `zt_story` ADD `fromVersion` smallint(6) NOT NULL default 1 after `fromStory`;
ALTER TABLE `zt_story` ADD `approvedDate` date NOT NULL after `assignedDate`;
ALTER TABLE `zt_todo` CHANGE `type` `type` char(15) NOT NULL AFTER `feedback`;
ALTER TABLE `zt_todo` CHANGE `type` char(15) NOT NULL AFTER `feedback`;
-- DROP TABLE IF EXISTS `zt_durationestimation`;
CREATE TABLE IF NOT EXISTS `zt_durationestimation` (
+7 -7
View File
@@ -172,14 +172,14 @@ class custom extends control
}
if(!empty($key) and !isset($oldCustoms[$key]) and $key != 'n/a' and !validater::checkREG($key, '/^[a-z_A-Z_0-9]+$/')) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStringKey));
/* The length of roleList in user module and typeList in todo module is less than 10. check it when saved. */
if($field == 'roleList' or $module == 'todo' and $field == 'typeList')
{
if(strlen($key) > 10) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['ten']));
}
/* The length of roleList in user module is less than 10. check it when saved. */
if($module == 'user' and $field == 'roleList' and strlen($key) > 10) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['ten']));
/* The length of typeList in todo module is less than 15. check it when saved. */
if($module == 'todo' and $field == 'typeList' and strlen($key) > 15) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['fifteen']));
/* The length of sourceList in story module and typeList in task module is less than 20, check it when saved. */
if($field == 'sourceList' or $module == 'task' and $field == 'typeList')
if(($module == 'story' and $field == 'sourceList') or ($module == 'task' and $field == 'typeList'))
{
if(strlen($key) > 20) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twenty']));
}
@@ -188,7 +188,7 @@ class custom extends control
if($module == 'testcase' and $field == 'stageList' and strlen($key) > 255) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['twoHundred']));
/* The length of field that in bug and testcase module and reasonList in story and task module is less than 30, check it when saved. */
if($module == 'bug' or $field == 'reasonList' or $module == 'testcase')
if(in_array($module, array('bug', 'testcase')) or (in_array($module, array('story', 'task')) and $field == 'reasonList'))
{
if(strlen($key) > 30) return $this->send(array('result' => 'fail', 'message' => $this->lang->custom->notice->invalidStrlen['thirty']));
}
+1
View File
@@ -183,6 +183,7 @@ $lang->custom->notice->indexPage['project'] = "ZenTao 8.2+ has Project Home. Do
$lang->custom->notice->indexPage['qa'] = "ZenTao 8.2+ has Test Homepage. Do you want to go to Test Homepage?";
$lang->custom->notice->invalidStrlen['ten'] = 'The key should be <= 10 characters.';
$lang->custom->notice->invalidStrlen['fifteen'] = 'The key should be <= 15 characters.';
$lang->custom->notice->invalidStrlen['twenty'] = 'The key should be <= 20 characters.';
$lang->custom->notice->invalidStrlen['thirty'] = 'The key should be <= 30 characters.';
$lang->custom->notice->invalidStrlen['twoHundred'] = 'The key should be <= 225 characters.';
+1
View File
@@ -183,6 +183,7 @@ $lang->custom->notice->indexPage['project'] = "从8.2版本起增加了项目主
$lang->custom->notice->indexPage['qa'] = "从8.2版本起增加了测试主页视图,是否默认进入测试主页?";
$lang->custom->notice->invalidStrlen['ten'] = '键的长度必须小于10个字符!';
$lang->custom->notice->invalidStrlen['fifteen'] = '键的长度必须小于15个字符!';
$lang->custom->notice->invalidStrlen['twenty'] = '键的长度必须小于20个字符!';
$lang->custom->notice->invalidStrlen['thirty'] = '键的长度必须小于30个字符!';
$lang->custom->notice->invalidStrlen['twoHundred'] = '键的长度必须小于225个字符!';
+1
View File
@@ -420,6 +420,7 @@ EOF;
$projects = $this->dao->select('t1.id,t1.name,t2.id as execution')->from(TABLE_PROJECT)->alias('t1')
->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.id=t2.project')
->where('t2.id')->in($executionIDList)
->andWhere('t1.type')->eq('project')
->fetchAll('execution');
}