diff --git a/module/common/lang/de.php b/module/common/lang/de.php index ad0b368951..04a8f57fd9 100644 --- a/module/common/lang/de.php +++ b/module/common/lang/de.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』should be letters or numbers."; $lang->error->account = "『%s』should be valid account."; -$lang->error->passwordsame = "Two passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should follow rules. It must be at least 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Image is not allowed to be pasted in your browser!'; diff --git a/module/common/lang/en.php b/module/common/lang/en.php index 01237576a5..86bac80496 100644 --- a/module/common/lang/en.php +++ b/module/common/lang/en.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』should be letters or numbers."; $lang->error->account = "『%s』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/fr.php b/module/common/lang/fr.php index 31d01e98ca..ca726018f9 100644 --- a/module/common/lang/fr.php +++ b/module/common/lang/fr.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『 %s 』should be valid date."; $lang->error->code = "『 %s 』should be letters or numbers."; $lang->error->account = "『 %s 』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Access is denied.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/vi.php b/module/common/lang/vi.php index c59c840b3b..443f355ece 100644 --- a/module/common/lang/vi.php +++ b/module/common/lang/vi.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』should be valid date."; $lang->error->datetime = "『%s』should be valid date."; $lang->error->code = "『%s』nên là chữ hoặc số."; $lang->error->account = "『%s』should be >= 3 letters or numbers."; -$lang->error->passwordsame = "Passwords should be consistent."; +$lang->error->passwordsame = "The password input is inconsistent."; $lang->error->passwordrule = "Password should conform to rules. It should be >= 6 characters."; $lang->error->accessDenied = 'Truy cập bị từ chối.'; $lang->error->pasteImg = 'Images are not allowed to be pasted in your browser!'; diff --git a/module/common/lang/zh-cn.php b/module/common/lang/zh-cn.php index 373528c7ad..7acc235484 100644 --- a/module/common/lang/zh-cn.php +++ b/module/common/lang/zh-cn.php @@ -528,7 +528,7 @@ $lang->error->date = "『%s』应当为合法的日期。"; $lang->error->datetime = "『%s』应当为合法的日期。"; $lang->error->code = "『%s』应当为字母或数字的组合。"; $lang->error->account = "『%s』只能是字母和数字的组合三位以上。"; -$lang->error->passwordsame = "两次密码应当相等。"; +$lang->error->passwordsame = "密码输入不一致。"; $lang->error->passwordrule = "密码应该符合规则,长度至少为六位。"; $lang->error->accessDenied = '您没有访问权限'; $lang->error->pasteImg = '您的浏览器不支持粘贴图片!'; diff --git a/module/file/model.php b/module/file/model.php index 85dce0a284..650f0cbfaa 100644 --- a/module/file/model.php +++ b/module/file/model.php @@ -537,10 +537,9 @@ class fileModel extends model { /* Parse file only in zentao. */ if(strpos(realpath($fileName), $this->app->getBasePath()) !== 0) return array(); - $content = file_get_contents($fileName); /* Fix bug #890. */ - $content = str_replace("\x82\x32", "\x10", $content); + $content = str_replace(array("\r\n","\r"), "\n", $content); $lines = explode("\n", $content); $col = -1; diff --git a/module/project/model.php b/module/project/model.php index eefde15016..25f064c1e2 100644 --- a/module/project/model.php +++ b/module/project/model.php @@ -460,6 +460,7 @@ class projectModel extends model $projects[$projectID]->order = $data->orders[$projectID]; } + $this->loadModel('user'); foreach($projects as $projectID => $project) { $oldProject = $oldProjects[$projectID]; @@ -492,9 +493,12 @@ class projectModel extends model $member->days = 0; $member->hours = $this->config->project->defaultWorkhours; $this->dao->replace(TABLE_TEAM)->data($member)->exec(); + + $changedAccounts[] = $value; } } } + $this->user->updateUserView($projectID, 'project', $changedAccounts); if(dao::isError()) die(js::error('project#' . $projectID . dao::getError(true))); $allChanges[$projectID] = common::createChanges($oldProject, $project); diff --git a/module/report/js/workload.js b/module/report/js/workload.js index 95e0528791..aa06a0916a 100644 --- a/module/report/js/workload.js +++ b/module/report/js/workload.js @@ -51,12 +51,12 @@ function diffDate(date1, date2) { date1 = convertStringToDate(date1); date2 = convertStringToDate(date2); - delta = (date2 - date1) / (1000 * 60 * 60 * 24); + delta = (date2 - date1) / (1000 * 60 * 60 * 24) + 1; weekEnds = 0; - for(i = 0; i < delta + 1; i++) + for(i = 0; i < delta; i++) { - if(date1.getDay() == 0 || date1.getDay() == 6) weekEnds ++; + if((weekend == 2 && date1.getDay() == 6) || date1.getDay() == 0) weekEnds ++; date1 = date1.valueOf(); date1 += 1000 * 60 * 60 * 24; date1 = new Date(date1); diff --git a/module/report/view/workload.html.php b/module/report/view/workload.html.php index 6704a59106..ace7c72071 100644 --- a/module/report/view/workload.html.php +++ b/module/report/view/workload.html.php @@ -1,5 +1,6 @@ +project->weekend);?>
diff --git a/module/story/control.php b/module/story/control.php index 593862d253..b26f86ddfd 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -478,10 +478,13 @@ class story extends control /* Assign. */ $story = $this->story->getById($storyID, 0, true); $product = $this->loadModel('product')->getById($story->product); + $stories = $this->story->getParentStoryPairs($story->product, $story->parent); + if(isset($stories[$storyID])) unset($stories[$storyID]); + $this->view->title = $this->lang->story->edit . "STORY" . $this->lang->colon . $this->view->story->title; $this->view->position[] = $this->lang->story->edit; $this->view->story = $story; - $this->view->stories = $this->story->getParentStoryPairs($story->product, $story->parent); + $this->view->stories = $stories; $this->view->users = $this->user->getPairs('pofirst|nodeleted', "$story->assignedTo,$story->openedBy,$story->closedBy"); $this->view->product = $product; $this->view->branches = $product->type == 'normal' ? array() : $this->loadModel('branch')->getPairs($story->product); diff --git a/module/story/lang/en.php b/module/story/lang/en.php index 306b4df023..5f35e81bf2 100644 --- a/module/story/lang/en.php +++ b/module/story/lang/en.php @@ -123,6 +123,9 @@ $lang->story->released = 'Released Stories'; $lang->story->ditto = 'Ditto'; $lang->story->dittoNotice = 'This story is not linked to the same product as the last one is!'; +$lang->story->needNotReviewList[0] = 'Need Review'; +$lang->story->needNotReviewList[1] = 'Need Not Review'; + $lang->story->useList[0] = 'Yes'; $lang->story->useList[1] = 'No'; diff --git a/module/story/lang/zh-cn.php b/module/story/lang/zh-cn.php index 92a4648b37..cd9b6406ee 100644 --- a/module/story/lang/zh-cn.php +++ b/module/story/lang/zh-cn.php @@ -123,6 +123,9 @@ $lang->story->released = "已发布{$lang->storyCommon}数"; $lang->story->ditto = '同上'; $lang->story->dittoNotice = "该{$lang->storyCommon}与上一{$lang->storyCommon}不属于同一产品!"; +$lang->story->needNotReviewList[0] = '需要评审'; +$lang->story->needNotReviewList[1] = '不需要评审'; + $lang->story->useList[0] = '不使用'; $lang->story->useList[1] = '使用'; diff --git a/module/story/model.php b/module/story/model.php index 58754536a1..48446f697b 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -662,6 +662,7 @@ class storyModel extends model unset($oldStory->parent); unset($story->parent); + $this->setStage($storyID); return common::createChanges($oldStory, $story); } } @@ -2828,6 +2829,13 @@ class storyModel extends model else if($id == 'stage') { $style .= 'overflow: visible;'; + if(isset($storyStages[$story->id])) + { + foreach($storyStages[$story->id] as $storyBranch => $storyStage) + { + if(isset($branches[$storyBranch])) $title .= $branches[$storyBranch] . ": " . $this->lang->story->stageList[$storyStage->stage] . "\n"; + } + } } echo ""; diff --git a/module/story/view/batchclose.html.php b/module/story/view/batchclose.html.php index f961c042dc..2815cf19f4 100755 --- a/module/story/view/batchclose.html.php +++ b/module/story/view/batchclose.html.php @@ -21,11 +21,11 @@
"> - + - + - + @@ -39,7 +39,7 @@
idAB;?> story->title;?>story->title;?> story->status;?>story->closedReason;?>story->closedReason;?> story->comment;?>
- story->reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 70px'");?> + story->reasonList, 'done', "class=form-control onchange=setDuplicateAndChild(this.value,$storyID) style='min-width: 80px'");?> ' closedReason != 'duplicate') echo "style='display:none'";?>> idAB}'");?> diff --git a/module/story/view/view.html.php b/module/story/view/view.html.php index 8f55734d77..3444929dec 100644 --- a/module/story/view/view.html.php +++ b/module/story/view/view.html.php @@ -350,7 +350,8 @@ { if(!isset($projects[$task->project])) continue; $projectName = $projects[$task->project]; - echo "
  • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "[T]$task->id $task->name", '', "class='iframe' data-width='80%'"); + $class = isonlybody() ? 'showinonlybody' : 'iframe'; + echo "
  • " . html::a($this->createLink('task', 'view', "taskID=$task->id", '', true), "[T]$task->id $task->name", '', "class=$class data-width='80%'"); echo html::a($this->createLink('project', 'browse', "projectID=$task->project"), $projectName, '', "class='text-muted'") . '
  • '; } } diff --git a/module/task/lang/zh-cn.php b/module/task/lang/zh-cn.php index 5c28c04036..1c8e9a873c 100644 --- a/module/task/lang/zh-cn.php +++ b/module/task/lang/zh-cn.php @@ -47,7 +47,7 @@ $lang->task->case = '相关用例'; $lang->task->confirmStoryChange = "确认{$lang->storyCommon}变动"; $lang->task->storyChange = "{$lang->storyCommon}变更"; $lang->task->progress = '进度'; -$lang->task->progressAB = '%'; +$lang->task->progressAB = '进度'; $lang->task->progressTips = '已消耗/(已消耗+剩余)'; $lang->task->copy = '复制任务'; $lang->task->waitTask = '未开始的任务'; diff --git a/module/task/model.php b/module/task/model.php index 6d228740d5..93e573fb50 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -1420,6 +1420,7 @@ class taskModel extends model { $oldTask = $this->getById($taskID); $now = helper::now(); + $today = helper::today(); if(strpos($this->config->task->finish->requiredFields, 'comment') !== false and !$this->post->comment) { @@ -1429,6 +1430,7 @@ class taskModel extends model $task = fixer::input('post') ->setIF(is_numeric($this->post->consumed), 'consumed', (float)$this->post->consumed) + ->setIF($oldTask->realStarted == '0000-00-00', 'realStarted', $today) ->setDefault('left', 0) ->setDefault('assignedTo', $oldTask->openedBy) ->setDefault('assignedDate', $now) diff --git a/module/task/view/view.html.php b/module/task/view/view.html.php index 40303a247a..b3b9fd2430 100644 --- a/module/task/view/view.html.php +++ b/module/task/view/view.html.php @@ -233,7 +233,8 @@
    storyTitle) echo $lang->noData; - if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class='iframe' data-width='80%'", true, true)) echo $task->storyTitle; + $class = isonlybody() ? 'showinonlybody' : 'iframe'; + if($task->storyTitle and !common::printLink('story', 'view', "storyID=$task->story", $task->storyTitle, '', "class=$class data-width='80%'", true, true)) echo $task->storyTitle; if($task->needConfirm) { echo "({$lang->story->changed} "; diff --git a/module/testtask/model.php b/module/testtask/model.php index 728195b8cd..6e66d463d3 100644 --- a/module/testtask/model.php +++ b/module/testtask/model.php @@ -1446,7 +1446,7 @@ class testtaskModel extends model break; case 'title': if($run->branch) echo "{$branches[$run->branch]}"; - echo $canView ? html::a($caseLink, $run->title) : $run->title; + echo $canView ? html::a($caseLink, $run->title, null, "style='color: $run->color'") : $run->title; break; case 'branch': echo $branches[$run->branch];