diff --git a/module/execution/config.php b/module/execution/config.php index f2304568fe..216136c250 100644 --- a/module/execution/config.php +++ b/module/execution/config.php @@ -31,10 +31,10 @@ $config->execution->edit->requiredFields = 'name,code,begin,end'; $config->execution->start->requiredFields = 'realBegan'; $config->execution->close->requiredFields = 'realEnd'; -$config->execution->customBatchEditFields = 'days,type,teamname,status,desc,PO,QD,PM,RD'; +$config->execution->customBatchEditFields = 'days,type,teamname,desc,PO,QD,PM,RD'; $config->execution->custom = new stdclass(); -$config->execution->custom->batchEditFields = 'days,status,PM'; +$config->execution->custom->batchEditFields = 'days,PM'; $config->execution->editor = new stdclass(); $config->execution->editor->create = array('id' => 'desc', 'tools' => 'simpleTools'); diff --git a/module/execution/control.php b/module/execution/control.php index 44d1973535..c8dd813474 100644 --- a/module/execution/control.php +++ b/module/execution/control.php @@ -2164,17 +2164,6 @@ class execution extends control $actionID = $this->loadModel('action')->create($this->objectType, $executionID, 'Edited'); $this->action->logHistory($actionID, $changes); - - $syncExecution = ''; - foreach($changes as $changeField) - { - if($changeField['field'] == 'status' && $changeField['old'] =='wait' && $changeField['new'] =='doing') - { - $syncExecution = $executionID; - break; - } - } - $this->loadModel('common')->syncPPEStatus($syncExecution); } } @@ -2237,6 +2226,54 @@ class execution extends control $this->display(); } + /** + * Batch change status. + * + * @param string $status + * @param int $projectID + * @access public + * @return void + */ + public function batchChangeStatus($status, $projectID = 0) + { + $executionIdList = $this->post->executionIDList; + if(is_string($executionIdList)) $executionIdList = explode(',', $executionIdList); + /* Sub-phases are changed first and then parented. */ + rsort($executionIdList); + + $pointOutStages = $this->execution->batchChangeStatus($executionIdList, $status); + $project = $this->loadModel('project')->getById($projectID); + + if($pointOutStages) + { + $alertLang = ''; + + if($status == 'wait') + { + /* In execution-all list or waterfall, waterfallplus project's execution list. */ + if(empty($project) or (!empty($project) and strpos($project->model, 'waterfall') !== false)) + { + $executionLang = (empty($project) or (!empty($project) and $project->model == 'waterfallplus')) ? $this->lang->execution->common : $this->lang->stage->common; + $alertLang = sprintf($this->lang->execution->hasStartedTaskOrSubStage, $executionLang, $pointOutStages); + } + + if(!empty($project) and strpos('agileplus,scrum', $project->model) !== false) + { + $executionLang = $project->model == 'scrum' ? $this->lang->executionCommon : $this->lang->execution->common; + $alertLang = sprintf($this->lang->execution->hasStartedTask, $executionLang, $pointOutStages); + } + } + + if($status == 'suspended') $alertLang = sprintf($this->lang->execution->hasSuspendedOrClosedChildren, $pointOutStages); + + if($status == 'closed') $alertLang = sprintf($this->lang->execution->hasNotClosedChildren, $pointOutStages); + + return print(js::alert($alertLang) . js::locate($this->session->executionList, 'parent')); + } + + return print(js::locate($this->session->executionList, 'parent')); + } + /** * Start execution. * diff --git a/module/execution/js/all.js b/module/execution/js/all.js index 959742346f..4e5cfbee4a 100644 --- a/module/execution/js/all.js +++ b/module/execution/js/all.js @@ -31,3 +31,24 @@ function byProduct(productID, projectID, status) { location.href = createLink('project', 'all', "status=" + status + "&project=" + projectID + "&orderBy=" + orderBy + '&productID=' + productID); } + +/** + * Set the color of the badge to white. + * + * @param object obj + * @param bool isShow + * @access public + * @return void + */ +function setBadgeStyle(obj, isShow) +{ + var $label = $(obj); + if(isShow == true) + { + $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); + } + else + { + $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); + } +} diff --git a/module/execution/lang/de.php b/module/execution/lang/de.php index cfe000f2a8..9cd8aa1b8c 100644 --- a/module/execution/lang/de.php +++ b/module/execution/lang/de.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Bearbeiten"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Mehere bearbeiten"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Teams verwalten'; $lang->execution->unlinkMember = 'Mitgliefer entfernen'; $lang->execution->unlinkStory = 'Story entfernen'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Möchten Sie {$lang->executionCommon}[%s] löschen?"; -$lang->execution->confirmUnlinkMember = "Möchten Sie den Benutzer vom {$lang->executionCommon} entfernen?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; -$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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$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 "; -$lang->execution->setTeam = 'Team setzen'; -$lang->execution->linkStory = 'Link Stories'; -$lang->execution->createTask = 'Aufgaben erstellen'; -$lang->execution->goback = "Zurückkehren"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Ohne Wochenende'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Mit Wochenende'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervale '; -$lang->execution->fixFirstWithLeft = 'Modify the left'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->confirmDelete = "Möchten Sie {$lang->executionCommon}[%s] löschen?"; +$lang->execution->confirmUnlinkMember = "Möchten Sie den Benutzer vom {$lang->executionCommon} entfernen?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; +$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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$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 "; +$lang->execution->setTeam = 'Team setzen'; +$lang->execution->linkStory = 'Link Stories'; +$lang->execution->createTask = 'Aufgaben erstellen'; +$lang->execution->goback = "Zurückkehren"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Ohne Wochenende'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Mit Wochenende'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervale '; +$lang->execution->fixFirstWithLeft = 'Modify the left'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/en.php b/module/execution/lang/en.php index 4914a06a6d..5331ed2369 100644 --- a/module/execution/lang/en.php +++ b/module/execution/lang/en.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Edit {$lang->executionCommon}"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Edit"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Manage Team'; $lang->execution->unlinkMember = 'Remove Member'; $lang->execution->unlinkStory = 'Unlink Story'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Do you want to delete the {$lang->executionCommon}[%s]?"; -$lang->execution->confirmUnlinkMember = "Do you want to unlink this User from {$lang->executionCommon}?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the execution?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the execution. Remove it from the {$lang->executionCommon}, then try again."; -$lang->execution->notAllowRemoveProducts = "The story %s 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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; -$lang->execution->tips = 'Note'; -$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; -$lang->execution->setTeam = 'Set Team'; -$lang->execution->linkStory = 'Link Story'; -$lang->execution->createTask = 'Create Task'; -$lang->execution->goback = "Go Back Task List"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Exclude Weekend'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Include Weekend'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervals '; -$lang->execution->fixFirstWithLeft = 'Update hours left too'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->confirmDelete = "Do you want to delete the {$lang->executionCommon}[%s]?"; +$lang->execution->confirmUnlinkMember = "Do you want to unlink this User from {$lang->executionCommon}?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the execution?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the execution. Remove it from the {$lang->executionCommon}, then try again."; +$lang->execution->notAllowRemoveProducts = "The story %s 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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$lang->execution->accessDenied = "Your access to {$lang->executionCommon} is denied!"; +$lang->execution->tips = 'Note'; +$lang->execution->afterInfo = "{$lang->executionCommon} is created. Next you can "; +$lang->execution->setTeam = 'Set Team'; +$lang->execution->linkStory = 'Link Story'; +$lang->execution->createTask = 'Create Task'; +$lang->execution->goback = "Go Back Task List"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Exclude Weekend'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Include Weekend'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervals '; +$lang->execution->fixFirstWithLeft = 'Update hours left too'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Seleted %s {$lang->executionCommon}."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/fr.php b/module/execution/lang/fr.php index bd6a30e4a5..41520d6e0d 100644 --- a/module/execution/lang/fr.php +++ b/module/execution/lang/fr.php @@ -262,6 +262,7 @@ $lang->execution->edit = "Edit {$lang->executionCommon}"; $lang->execution->editAction = "Edit Execution"; $lang->execution->batchEdit = "Edit"; $lang->execution->batchEditAction = "Batch Edit"; +$lang->execution->batchChangeStatus = "Batch Change Status"; $lang->execution->manageMembers = 'Manage Team'; $lang->execution->unlinkMember = 'Remove Member'; $lang->execution->unlinkStory = 'Unlink Story'; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "({$lang->SRCommon} has never been link $lang->execution->copyTeamTitle = "Choose a {$lang->project->common} or {$lang->execution->common} Team to copy."; /* Interactive prompts. */ -$lang->execution->confirmDelete = "Voulez-vous réellement supprimer le {$lang->executionCommon}[%s] ?"; -$lang->execution->confirmUnlinkMember = "Voulez-vous retirer cet utilisateur du {$lang->executionCommon} ?"; -$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; -$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; -$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; -$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; -$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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; -$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; -$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; -$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; -$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; -$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; -$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; -$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; -$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 "; -$lang->execution->setTeam = "Composer l'Equipe"; -$lang->execution->linkStory = 'Stories liées'; -$lang->execution->createTask = 'Créer des Tâches'; -$lang->execution->goback = "Revenir en arrière"; -$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; -$lang->execution->noweekend = 'Exclure les Weekends'; -$lang->execution->nodelay = 'Exclude Delay Date'; -$lang->execution->withweekend = 'Inclure les Weekends'; -$lang->execution->withdelay = 'Include Delay Date'; -$lang->execution->interval = 'Intervalles'; -$lang->execution->fixFirstWithLeft = 'Mettre à jour les heures également'; -$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; -$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; -$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; -$lang->execution->projectNotEmpty = 'Project cannot be empty.'; -$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; -$lang->execution->ge = "『%s』should be >= actual begin『%s』."; -$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; -$lang->execution->countTip = ' (%s member)'; -$lang->execution->pleaseInput = "Enter"; -$lang->execution->week = 'week'; -$lang->execution->checkedExecutions = "Pour s électionner l'élément%s."; +$lang->execution->confirmDelete = "Voulez-vous réellement supprimer le {$lang->executionCommon}[%s] ?"; +$lang->execution->confirmUnlinkMember = "Voulez-vous retirer cet utilisateur du {$lang->executionCommon} ?"; +$lang->execution->confirmUnlinkStory = "After {$lang->SRCommon} is removed, cased linked to {$lang->SRCommon} will be reomoved and tasks linked to {$lang->SRCommon} will be cancelled. Do you want to continue?"; +$lang->execution->confirmSync = "After modifying the project, in order to maintain the consistency of data, the data of products, requirements, teams and whitelist associated with the implementation will be synchronized to the new project. Please know."; +$lang->execution->confirmUnlinkExecutionStory = "Do you want to unlink this Story from the project?"; +$lang->execution->notAllowedUnlinkStory = "This {$lang->SRCommon} is linked to the {$lang->executionCommon} of the project. Remove it from the {$lang->executionCommon}, then try again."; +$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->errorSameBranches = "{$lang->executionCommon} cannot be linked to the same branch 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->errorLetterProject = "The start time of {$lang->executionCommon} cannot be less than the start time of the project %s."; +$lang->execution->errorGreaterProject = "The end time of {$lang->executionCommon} cannot be greater than the end time %s of the project."; +$lang->execution->errorCommonBegin = 'The start date of ' . $lang->executionCommon . ' should be ≥ the start date of project : %s.'; +$lang->execution->errorCommonEnd = 'The deadline of ' . $lang->executionCommon . ' should be ≤ the deadline of project : %s.'; +$lang->execution->errorLetterParent = 'The begin cannot be less than the begin of the parent stage to which it belongs: %s.'; +$lang->execution->errorGreaterParent = 'The end cannot be greater than the end of the parent stage to which it belongs:%s.'; +$lang->execution->errorNameRepeat = 'Child stages of the same parent stage cannot have the same name.'; +$lang->execution->errorAttrMatch = "Parent stage's attribute is [%s], the attribute needs to be consistent with the parent stage."; +$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 "; +$lang->execution->setTeam = "Composer l'Equipe"; +$lang->execution->linkStory = 'Stories liées'; +$lang->execution->createTask = 'Créer des Tâches'; +$lang->execution->goback = "Revenir en arrière"; +$lang->execution->gobackExecution = "Go Back {$lang->executionCommon} List"; +$lang->execution->noweekend = 'Exclure les Weekends'; +$lang->execution->nodelay = 'Exclude Delay Date'; +$lang->execution->withweekend = 'Inclure les Weekends'; +$lang->execution->withdelay = 'Include Delay Date'; +$lang->execution->interval = 'Intervalles'; +$lang->execution->fixFirstWithLeft = 'Mettre à jour les heures également'; +$lang->execution->unfinishedExecution = "This {$lang->executionCommon} has "; +$lang->execution->unfinishedTask = "[%s] unfinished tasks. "; +$lang->execution->unresolvedBug = "[%s] unresolved bugs. "; +$lang->execution->projectNotEmpty = 'Project cannot be empty.'; +$lang->execution->confirmStoryToTask = $lang->SRCommon . '%s are converted to tasks in the current. Do you want to convert them anyways?'; +$lang->execution->ge = "『%s』should be >= actual begin『%s』."; +$lang->execution->storyDragError = "The {$lang->SRCommon} is not active. Please activate and drag again."; +$lang->execution->countTip = ' (%s member)'; +$lang->execution->pleaseInput = "Enter"; +$lang->execution->week = 'week'; +$lang->execution->checkedExecutions = "Pour s électionner l'élément%s."; +$lang->execution->hasStartedTaskOrSubStage = "Tasks or subphases under %s %s have already started, cannot be modified, and have been filtered."; +$lang->execution->hasSuspendedOrClosedChildren = "The sub-stages under stage %s are not all suspended or closed, cannot be modified, and have been filtered."; +$lang->execution->hasNotClosedChildren = "The sub-stages under stage %s are not all closed, cannot be modified, and have been filtered."; +$lang->execution->hasStartedTask = "The task under %s %s has already started, cannot be modified, and has been filtered."; /* Statistics. */ $lang->execution->charts = new stdclass(); @@ -561,6 +566,9 @@ $lang->execution->action->startbychildclose = '$date, the stage status is execution->action->startbychildcreate = '$date, the stage status is Doing as the system judges that its sub-stages are Created. '; $lang->execution->action->startbychildedit = '$date, the stage status is Doing as the system judges that its sub-stages are Edited'; $lang->execution->action->startbychild = '$date, the stage status is Doing as the system judges that its sub-stages are Activated.'; +$lang->execution->action->waitbychild = '$date, the stage status is Wait as the system judges that its sub-stages are Edited'; +$lang->execution->action->suspendbychild = '$date, the stage status is Suspended as the system judges that its sub-stages are Edited'; +$lang->execution->action->closebychild = '$date, the stage status is Closed as the system judges that its sub-stages are Edited'; $lang->execution->startbychildactivate = 'activated'; $lang->execution->waitbychilddelete = 'stop'; @@ -576,6 +584,9 @@ $lang->execution->startbychildclose = 'activated'; $lang->execution->startbychildcreate = 'activated'; $lang->execution->startbychildedit = 'activated'; $lang->execution->startbychild = 'activated'; +$lang->execution->waitbychild = 'stop'; +$lang->execution->suspendbychild = 'suspended'; +$lang->execution->closebychild = 'closed'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/lang/zh-cn.php b/module/execution/lang/zh-cn.php index 5353f38177..bfb7610028 100644 --- a/module/execution/lang/zh-cn.php +++ b/module/execution/lang/zh-cn.php @@ -262,6 +262,7 @@ $lang->execution->edit = "设置{$lang->executionCommon}"; $lang->execution->editAction = "编辑{$lang->execution->common}"; $lang->execution->batchEdit = "编辑"; $lang->execution->batchEditAction = "批量编辑"; +$lang->execution->batchChangeStatus = "批量修改状态"; $lang->execution->manageMembers = '团队管理'; $lang->execution->unlinkMember = '移除成员'; $lang->execution->unlinkStory = "移除{$lang->SRCommon}"; @@ -376,51 +377,55 @@ $lang->execution->linkAllStoryTip = "(项目下还未关联{$lang->SRCommon $lang->execution->copyTeamTitle = "选择一个{$lang->project->common}或{$lang->execution->common}团队"; /* 交互提示。*/ -$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?"; -$lang->execution->confirmUnlinkMember = "您确定从该{$lang->executionCommon}中移除该用户吗?"; -$lang->execution->confirmUnlinkStory = "移除该{$lang->SRCommon}后,该{$lang->SRCommon}关联的用例将被移除,该{$lang->SRCommon}关联的任务将被取消,请确认。"; -$lang->execution->confirmSync = "修改所属项目后,为了保持数据的一致性,该执行所关联的产品、需求、团队和白名单数据将会同步到新的项目中,请知悉。"; -$lang->execution->confirmUnlinkExecutionStory = "您确定从该项目中移除该{$lang->SRCommon}吗?"; -$lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项目下{$lang->executionCommon}相关联,请从{$lang->executionCommon}中移除后再操作。"; -$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}%s已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。"; -$lang->execution->errorNoLinkedProducts = "该{$lang->executionCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面"; -$lang->execution->errorSameProducts = "{$lang->executionCommon}不能关联多个相同的{$lang->productCommon}。"; -$lang->execution->errorSameBranches = "{$lang->executionCommon}不能关联多个相同的分支。"; -$lang->execution->errorBegin = "{$lang->executionCommon}的开始时间不能小于所属项目的开始时间%s。"; -$lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; -$lang->execution->errorLetterProject = "{$lang->executionCommon}的计划开始时间不能小于所属项目的计划开始时间%s。"; -$lang->execution->errorGreaterProject = "{$lang->executionCommon}的计划完成时间不能大于所属项目的计划完成时间%s。"; -$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; -$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; -$lang->execution->errorLetterParent = '计划开始时间不能小于所属父阶段的计划开始时间:%s。'; -$lang->execution->errorGreaterParent = '计划完成时间不能大于所属父阶段的计划完成时间:%s。'; -$lang->execution->errorNameRepeat = '相同父阶段的子阶段名称不能相同'; -$lang->execution->errorAttrMatch = "父阶段类型为[%s],阶段类型需与父阶段一致"; -$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; -$lang->execution->tips = '提示'; -$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; -$lang->execution->setTeam = '设置团队'; -$lang->execution->linkStory = "关联{$lang->SRCommon}"; -$lang->execution->createTask = '创建任务'; -$lang->execution->goback = "返回任务列表"; -$lang->execution->gobackExecution = "返回{$lang->executionCommon}列表"; -$lang->execution->noweekend = '去除周末'; -$lang->execution->nodelay = '去除延期日期'; -$lang->execution->withweekend = '显示周末'; -$lang->execution->withdelay = '显示延期日期'; -$lang->execution->interval = '间隔'; -$lang->execution->fixFirstWithLeft = '修改剩余工时'; -$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有"; -$lang->execution->unfinishedTask = "[%s]个未完成的任务,"; -$lang->execution->unresolvedBug = "[%s]个未解决的bug,"; -$lang->execution->projectNotEmpty = '所属项目不能为空。'; -$lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。'; -$lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。"; -$lang->execution->storyDragError = "该{$lang->SRCommon}不是激活状态,请激活后再拖动"; -$lang->execution->countTip = '(%s人)'; -$lang->execution->pleaseInput = "请输入"; -$lang->execution->week = '周'; -$lang->execution->checkedExecutions = "共选中%s个{$lang->executionCommon}。"; +$lang->execution->confirmDelete = "您确定删除{$lang->executionCommon}[%s]吗?"; +$lang->execution->confirmUnlinkMember = "您确定从该{$lang->executionCommon}中移除该用户吗?"; +$lang->execution->confirmUnlinkStory = "移除该{$lang->SRCommon}后,该{$lang->SRCommon}关联的用例将被移除,该{$lang->SRCommon}关联的任务将被取消,请确认。"; +$lang->execution->confirmSync = "修改所属项目后,为了保持数据的一致性,该执行所关联的产品、需求、团队和白名单数据将会同步到新的项目中,请知悉。"; +$lang->execution->confirmUnlinkExecutionStory = "您确定从该项目中移除该{$lang->SRCommon}吗?"; +$lang->execution->notAllowedUnlinkStory = "该{$lang->SRCommon}已经与项目下{$lang->executionCommon}相关联,请从{$lang->executionCommon}中移除后再操作。"; +$lang->execution->notAllowRemoveProducts = "该{$lang->productCommon}中的{$lang->SRCommon}%s已与该{$lang->executionCommon}进行了关联,请取消关联后再操作。"; +$lang->execution->errorNoLinkedProducts = "该{$lang->executionCommon}没有关联的{$lang->productCommon},系统将转到{$lang->productCommon}关联页面"; +$lang->execution->errorSameProducts = "{$lang->executionCommon}不能关联多个相同的{$lang->productCommon}。"; +$lang->execution->errorSameBranches = "{$lang->executionCommon}不能关联多个相同的分支。"; +$lang->execution->errorBegin = "{$lang->executionCommon}的开始时间不能小于所属项目的开始时间%s。"; +$lang->execution->errorEnd = "{$lang->executionCommon}的截止时间不能大于所属项目的结束时间%s。"; +$lang->execution->errorLetterProject = "{$lang->executionCommon}的计划开始时间不能小于所属项目的计划开始时间%s。"; +$lang->execution->errorGreaterProject = "{$lang->executionCommon}的计划完成时间不能大于所属项目的计划完成时间%s。"; +$lang->execution->errorCommonBegin = $lang->executionCommon . '开始日期应大于等于项目的开始日期:%s。'; +$lang->execution->errorCommonEnd = $lang->executionCommon . '截止日期应小于等于项目的截止日期:%s。'; +$lang->execution->errorLetterParent = '计划开始时间不能小于所属父阶段的计划开始时间:%s。'; +$lang->execution->errorGreaterParent = '计划完成时间不能大于所属父阶段的计划完成时间:%s。'; +$lang->execution->errorNameRepeat = '相同父阶段的子阶段名称不能相同'; +$lang->execution->errorAttrMatch = "父阶段类型为[%s],阶段类型需与父阶段一致"; +$lang->execution->accessDenied = "您无权访问该{$lang->executionCommon}!"; +$lang->execution->tips = '提示'; +$lang->execution->afterInfo = "{$lang->executionCommon}添加成功,您现在可以进行以下操作:"; +$lang->execution->setTeam = '设置团队'; +$lang->execution->linkStory = "关联{$lang->SRCommon}"; +$lang->execution->createTask = '创建任务'; +$lang->execution->goback = "返回任务列表"; +$lang->execution->gobackExecution = "返回{$lang->executionCommon}列表"; +$lang->execution->noweekend = '去除周末'; +$lang->execution->nodelay = '去除延期日期'; +$lang->execution->withweekend = '显示周末'; +$lang->execution->withdelay = '显示延期日期'; +$lang->execution->interval = '间隔'; +$lang->execution->fixFirstWithLeft = '修改剩余工时'; +$lang->execution->unfinishedExecution = "该{$lang->executionCommon}下还有"; +$lang->execution->unfinishedTask = "[%s]个未完成的任务,"; +$lang->execution->unresolvedBug = "[%s]个未解决的bug,"; +$lang->execution->projectNotEmpty = '所属项目不能为空。'; +$lang->execution->confirmStoryToTask = '%s' . $lang->SRCommon . '已经在当前' . $lang->execution->common . '中转了任务,请确认是否重复转任务。'; +$lang->execution->ge = "『%s』应当不小于实际开始时间『%s』。"; +$lang->execution->storyDragError = "该{$lang->SRCommon}不是激活状态,请激活后再拖动"; +$lang->execution->countTip = '(%s人)'; +$lang->execution->pleaseInput = "请输入"; +$lang->execution->week = '周'; +$lang->execution->checkedExecutions = "共选中%s个{$lang->executionCommon}。"; +$lang->execution->hasStartedTaskOrSubStage = "%s%s下的任务或子阶段已经开始,无法修改,已过滤。"; +$lang->execution->hasSuspendedOrClosedChildren = "阶段%s下的子阶段未全部挂起或关闭,无法修改,已过滤。"; +$lang->execution->hasNotClosedChildren = "阶段%s下的子阶段未全部关闭,无法修改,已过滤。"; +$lang->execution->hasStartedTask = "%s%s下的任务已经开始,无法修改,已过滤。"; /* 统计。*/ $lang->execution->charts = new stdclass(); @@ -561,7 +566,9 @@ $lang->execution->action->startbychildclose = '$date, 系统判断由于子 $lang->execution->action->startbychildcreate = '$date, 系统判断由于 创建 子阶段 ,将阶段状态置为 进行中 。'; $lang->execution->action->startbychildedit = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 进行中 。'; $lang->execution->action->startbychild = '$date, 系统判断由于子阶段 激活 ,将阶段状态置为 进行中 。'; - +$lang->execution->action->waitbychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 未开始 。'; +$lang->execution->action->suspendbychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 已挂起 。'; +$lang->execution->action->closebychild = '$date, 系统判断由于子阶段 状态修改 ,将阶段状态置为 已关闭 。'; $lang->execution->startbychildactivate = '激活了'; $lang->execution->waitbychilddelete = '停止了'; @@ -577,6 +584,9 @@ $lang->execution->startbychildclose = '激活了'; $lang->execution->startbychildcreate = '激活了'; $lang->execution->startbychildedit = '激活了'; $lang->execution->startbychild = '激活了'; +$lang->execution->waitbychild = '停止了'; +$lang->execution->suspendbychild = '挂起了'; +$lang->execution->closebychild = '关闭了'; $lang->execution->statusColorList = array(); $lang->execution->statusColorList['wait'] = '#0991FF'; diff --git a/module/execution/model.php b/module/execution/model.php index b55724ecaf..2c76c4d05e 100755 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -754,7 +754,6 @@ class executionModel extends model $executions[$executionID]->PO = $data->POs[$executionID]; $executions[$executionID]->QD = $data->QDs[$executionID]; $executions[$executionID]->RD = $data->RDs[$executionID]; - $executions[$executionID]->status = $data->statuses[$executionID]; $executions[$executionID]->begin = $data->begins[$executionID]; $executions[$executionID]->end = $data->ends[$executionID]; $executions[$executionID]->team = $data->teams[$executionID]; @@ -767,8 +766,6 @@ class executionModel extends model if(isset($data->projects)) $executions[$executionID]->project = zget($data->projects, $executionID, 0); if(isset($data->attributes)) $executions[$executionID]->attribute = zget($data->attributes, $executionID, ''); if(isset($data->lifetimes)) $executions[$executionID]->lifetime = $data->lifetimes[$executionID]; - if($executions[$executionID]->status == 'closed' and $oldExecutions[$executionID]->status != 'closed') $executions[$executionID]->closedDate = helper::now(); - if($executions[$executionID]->status == 'suspended' and $oldExecutions[$executionID]->status != 'suspended') $executions[$executionID]->suspendedDate = helper::today(); $oldExecution = $oldExecutions[$executionID]; $projectID = isset($executions[$executionID]->project) ? $executions[$executionID]->project : $oldExecution->project; @@ -975,6 +972,245 @@ class executionModel extends model return $allChanges; } + /** + * Batch change status. + * + * @param array $executionIdList + * @param string $status + * @access public + * @return void + */ + public function batchChangeStatus($executionIdList, $status) + { + $this->loadModel('programplan'); + $this->loadModel('action'); + + $selfAndChildrenList = $this->programplan->getSelfAndChildrenList($executionIdList); + $siblingStages = $this->programplan->getSiblings($executionIdList); + $pointOutStages = ''; + + foreach($executionIdList as $executionID) + { + $selfAndChildren = $selfAndChildrenList[$executionID]; + $execution = $selfAndChildren[$executionID]; + $executionType = $execution->type; + + $siblingList = array(); + if($executionType == 'stage') $siblingList = $siblingStages[$executionID]; + + if($status == 'wait' and $execution->status != 'wait') + { + $pointOutStages .= $this->changeStatus2Wait($executionID, $selfAndChildren, $siblingList); + } + + if($status == 'doing' and $execution->status != 'doing') + { + $this->changeStatus2Doing($executionID, $selfAndChildren); + } + + if(($status == 'suspended' and $execution->status != 'suspended') or ($status == 'closed' and $execution->status != 'closed')) + { + $pointOutStages .= $this->changeStatus2Inactived($executionID, $status, $selfAndChildren, $siblingList); + } + } + + return trim($pointOutStages, ','); + } + + /** + * Change status to wait. + * + * @param int $executionID + * @param array $selfAndChildren + * @param array $siblingStages + * @access public + * @return string + */ + public function changeStatus2Wait($executionID, $selfAndChildren, $siblingStages) + { + $parentID = $selfAndChildren[$executionID]->parent; + + /* There are already tasks consuming work in this phase or its sub-phases already have start times. */ + $hasStartedChildren = $this->dao->select('id')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('realBegan')->ne('0000-00-00')->andWhere('id')->in(array_keys($selfAndChildren))->andWhere('id')->ne($executionID)->fetchPairs(); + $hasConsumedTasks = $this->dao->select('count(consumed) as count')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in(array_keys($selfAndChildren))->andWhere('consumed')->gt(0)->fetch('count'); + if($hasStartedChildren or $hasConsumedTasks) return "'{$selfAndChildren[$executionID]->name}',"; + + $newExecution = $this->buildExecutionBySstatus('wait'); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + + if(!dao::isError()) + { + /* Action. */ + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + /* This stage has a parent stage. */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + $siblingsAllWait = true; + if(!$checkTopStage) + { + /* Check sibling stages are all wait. */ + foreach($siblingStages as $siblingID => $sibling) + { + if($siblingID == $executionID) continue; + + if($sibling->status != 'wait') + { + $siblingsAllWait = false; + return $pointOutStages; + } + } + + if($siblingsAllWait) + { + /* Actual start or consumed work exists for the parent phase. */ + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + $parentsChildren = $this->dao->select('id')->from(TABLE_EXECUTION)->where('deleted')->eq(0)->andWhere('path')->like("%,$executionID,%")->andWhere('id')->ne($parentID)->fetchPairs(); + $parentHasConsumedTasks = $this->dao->select('count(id) as count')->from(TABLE_TASK)->where('deleted')->eq(0)->andWhere('execution')->in($parentsChildren)->andWhere('consumed')->gt(0)->fetch('count'); + + $parentStatus = (!helper::isZeroDate($parent->realBegan) or $parentHasConsumedTasks) ? 'doing' : 'wait'; + if($parent->status == $parentStatus) return ''; + + $newParent = $this->buildExecutionBySstatus($parentStatus); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionType = $parentStatus == 'doing' ? 'startbychildedit' : 'waitbychild'; + $actionID = $this->action->create('execution', $parentID, $actionType, '', $actionType); + $this->action->logHistory($actionID, $changes); + + if($parent->status == 'wait' and $parentStatus == 'doing') $this->loadModel('common')->syncPPEStatus($parentID); + } + } + } + } + } + + /** + * Change status to doing. + * + * @param int $executionID + * @param array $selfAndChildren + * @access public + * @return string + */ + public function changeStatus2Doing($executionID, $selfAndChildren) + { + $type = $selfAndChildren[$executionID]->type; + $parentID = $selfAndChildren[$executionID]->parent; + + $newExecution = $this->buildExecutionBySstatus('doing'); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + if(!dao::isError()) + { + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + if($type != 'stage') return ''; + + /* This stage has a parent stage. */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + if(!$checkTopStage) + { + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + if($parent->status == 'doing') return ''; + + $newParent = $this->buildExecutionBySstatus('doing'); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionID = $this->action->create('execution', $parentID, 'startbychildedit', '', 'startbychildedit'); + $this->action->logHistory($actionID, $changes); + + if($parent->status == 'wait') $this->loadModel('common')->syncPPEStatus($parentID); + } + } + } + } + + /** + * Change status to suspended or closed. + * + * @param int $executionID + * @param strint $status + * @param array $selfAndChildren + * @param array $siblingStages + * @access public + * @return string + */ + public function changeStatus2Inactived($executionID, $status, $selfAndChildren, $siblingStages) + { + $type = $selfAndChildren[$executionID]->type; + $parentID = $selfAndChildren[$executionID]->parent; + $checkedStatus = $status == 'suspended' ? 'wait,doing' : 'wait,doing,suspended'; + + /* If status is suspended, the rules is there are sub-stages under this stage, and not all sub-stages are suspended or closed. */ + /* If status is closed, the rules is there are sub-stages under this stage, and not all sub-stages are closed. */ + $checkLeafStage = $this->programplan->checkLeafStage($executionID); + if(!$checkLeafStage) + { + foreach($selfAndChildren as $childID => $child) + { + if($childID == $executionID) continue; + + if(strpos($checkedStatus, $child->status) !== false) return "'{$selfAndChildren[$executionID]->name}',"; + } + } + + $newExecution = $this->buildExecutionBySstatus($status); + $this->dao->update(TABLE_EXECUTION)->data($newExecution)->where('id')->eq($executionID)->exec(); + if(!dao::isError()) + { + $changes = common::createChanges($selfAndChildren[$executionID], $newExecution); + $actionID = $this->action->create('execution', $executionID, 'Edited'); + $this->action->logHistory($actionID, $changes); + + if($type != 'stage') return ''; + + /* Suspended: When all child stages at the same level are suspended or closed, the status of the parent stage becomes "suspended". */ + /* Closed: When all child stages at the same level are closed, the status of the parent stage becomes "closed". */ + $checkTopStage = $this->programplan->checkTopStage($executionID); + $siblingsAllInactived = true; + if(!$checkTopStage) + { + foreach($siblingStages as $siblingID => $sibling) + { + if($siblingID == $executionID) continue; + + if(strpos($checkedStatus, $sibling->status) !== false) + { + $siblingsAllInactived = false; + break; + } + } + + if($siblingsAllInactived) + { + $parent = $this->dao->select('*')->from(TABLE_EXECUTION)->where('id')->eq($parentID)->fetch(); + if($parent->status == $status) return ''; + + $newParent = $this->buildExecutionBySstatus($status); + $this->dao->update(TABLE_EXECUTION)->data($newParent)->where('id')->eq($parentID)->exec(); + + if(!dao::isError()) + { + $changes = common::createChanges($parent, $newParent); + $actionType = $status == 'suspended' ? 'suspendbychild' : 'closebychild'; + $actionID = $this->action->create('execution', $parentID, $actionType, '', $actionType); + $this->action->logHistory($actionID, $changes); + } + } + } + } + + } + /** * Start execution. * @@ -5613,4 +5849,56 @@ class executionModel extends model return $executionIdList; } + + /** + * Build execution object by status. + * + * @param string $status + * @access public + * @return object + */ + public function buildExecutionBySstatus($status) + { + $execution = new stdclass(); + $execution->status = $status; + $execution->lastEditedBy = $this->app->user->account; + $execution->lastEditedDate = helper::now(); + + if($status == 'wait') + { + $execution->realBegan = ''; + $execution->realEnd = ''; + $execution->closedBy = ''; + $execution->closedDate = ''; + $execution->canceledBy = ''; + $execution->canceledDate = ''; + $execution->suspendedDate = ''; + } + + if($status == 'doing') + { + $execution->realBegan = helper::today(); + $execution->realEnd = ''; + $execution->closedBy = ''; + $execution->closedDate = ''; + $execution->canceledBy = ''; + $execution->canceledDate = ''; + $execution->suspendedDate = ''; + } + + if($status == 'suspended') + { + $execution->suspendedDate = helper::now(); + $execution->closedBy = ''; + $execution->closedDate = ''; + } + + if($status == 'closed') + { + $execution->closedBy = $this->app->user->account; + $execution->closedDate = helper::now(); + } + + return $execution; + } } diff --git a/module/execution/view/all.html.php b/module/execution/view/all.html.php index 23d70c16a9..b6007fc541 100644 --- a/module/execution/view/all.html.php +++ b/module/execution/view/all.html.php @@ -32,6 +32,7 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()); ?> + show('right', 'pagerjs');?> @@ -159,6 +174,24 @@ js::set('isCNLang', !$this->loadModel('common')->checkNotCN()); document.body.appendChild(tempform); tempform.submit(); }) + + $('.statusLink').click(function() + { + var changeStatusLink = $(this).data('link'); + var tempform = document.createElement("form"); + tempform.action = changeStatusLink; + tempform.method = "post"; + tempform.target = "hiddenwin"; + tempform.style.display = "none"; + + var opt = document.createElement("input"); + opt.name = 'executionIDList'; + opt.value = checkItems; + + tempform.appendChild(opt); + document.body.appendChild(tempform); + tempform.submit(); + }) diff --git a/module/execution/view/batchedit.html.php b/module/execution/view/batchedit.html.php index 477eeaa4e8..5b95828e0f 100755 --- a/module/execution/view/batchedit.html.php +++ b/module/execution/view/batchedit.html.php @@ -41,7 +41,6 @@ $PM = $from == 'execution' ? 'execPM' : 'PM'; $type = $from == 'execution' ? 'execType' : 'type'; $desc = $from == 'execution' ? 'execDesc' : 'desc'; - $status = $from == 'execution' ? 'execStatus' : 'status'; ?> '>
@@ -64,7 +63,6 @@ '>execution->QD;?> '>execution->RD;?> '>execution->$type;?> - '>execution->$status;?> execution->begin;?> execution->end;?> '>execution->$desc;?> @@ -107,7 +105,6 @@ execution->lifeTimeList, $executions[$executionID]->lifetime, 'class=form-control');?> - '>execution->statusList, $executions[$executionID]->status, 'class=form-control');?> begin, "id='begins{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> end, "id='ends{$executionID}' class='form-control form-date' onchange='computeWorkDays(this.id)'");?> '>desc, "rows='1' class='form-control autosize'");?> diff --git a/module/group/lang/resource.php b/module/group/lang/resource.php index 6d3ff6178f..ac6c5c578b 100644 --- a/module/group/lang/resource.php +++ b/module/group/lang/resource.php @@ -802,6 +802,7 @@ $lang->resource->execution->browse = 'browse'; $lang->resource->execution->create = 'createExec'; $lang->resource->execution->edit = 'editAction'; $lang->resource->execution->batchedit = 'batchEditAction'; +$lang->resource->execution->batchchangestatus = 'batchChangeStatus'; $lang->resource->execution->start = 'startAction'; $lang->resource->execution->activate = 'activateAction'; $lang->resource->execution->putoff = 'delayAction'; @@ -860,6 +861,7 @@ $lang->execution->methodOrder[10] = 'browse'; $lang->execution->methodOrder[15] = 'create'; $lang->execution->methodOrder[20] = 'edit'; $lang->execution->methodOrder[25] = 'batchedit'; +$lang->execution->methodOrder[27] = 'batchchangestatus'; $lang->execution->methodOrder[30] = 'start'; $lang->execution->methodOrder[35] = 'activate'; $lang->execution->methodOrder[40] = 'putoff'; diff --git a/module/programplan/model.php b/module/programplan/model.php index 15d82b1d11..05efcceeb2 100755 --- a/module/programplan/model.php +++ b/module/programplan/model.php @@ -1616,4 +1616,60 @@ class programplanModel extends model $this->updateSubStageAttr($childID, $attribute, $withDeleted); } } + + /** + * Get plan and its children. + * + * @param array $planIdList + * @access public + * @return array + */ + public function getSelfAndChildrenList($planIdList) + { + $planList = $this->dao->select('t2.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('FIND_IN_SET(t1.id,t2.`path`)') + ->where('t1.id')->in($planIdList) + ->andWhere('t2.deleted')->eq(0) + ->fetchAll('id'); + + $selfAndChildrenList = array(); + foreach($planIdList as $planID) + { + if(!isset($selfAndChildrenList[$planID])) $selfAndChildrenList[$planID] = array(); + foreach($planList as $plan) + { + if(strpos($plan->path, ",$planID,") !== false) $selfAndChildrenList[$planID][$plan->id] = $plan; + } + } + + return $selfAndChildrenList; + } + + /** + * Get plan's siblings. + * + * @param array $planIdList + * @access public + * @return array + */ + public function getSiblings($planIdList) + { + $siblingsList = $this->dao->select('t1.*')->from(TABLE_EXECUTION)->alias('t1') + ->leftJoin(TABLE_EXECUTION)->alias('t2')->on('t1.parent=t2.parent') + ->where('t2.id')->in($planIdList) + ->andWhere('t1.deleted')->eq(0) + ->fetchAll('id'); + + $siblingStages = array(); + foreach($planIdList as $planID) + { + if(!isset($siblingStages[$planID])) $siblingStages[$planID] = array(); + foreach($siblingsList as $sibling) + { + if($siblingsList[$planID]->parent == $sibling->parent) $siblingStages[$planID][$sibling->id] = $sibling; + } + } + + return $siblingStages; + } } diff --git a/module/project/control.php b/module/project/control.php index 089447b42f..06fa156006 100755 --- a/module/project/control.php +++ b/module/project/control.php @@ -1103,19 +1103,30 @@ class project extends control if(!empty($execution->tasks) or !empty($execution->children)) $showToggleIcon = true; } - $this->view->executionStats = $executionStats; - $this->view->showToggleIcon = $showToggleIcon; - $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); - $this->view->productID = $productID; - $this->view->product = $this->product->getByID($productID); - $this->view->projectID = $projectID; - $this->view->project = $project; - $this->view->projects = $projects; - $this->view->pager = $pager; - $this->view->orderBy = $orderBy; - $this->view->users = $this->loadModel('user')->getPairs('noletter'); - $this->view->status = $status; - $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $changeStatusHtml = "
"; + $changeStatusHtml .= ""; + $changeStatusHtml .= "
"; + + $this->view->executionStats = $executionStats; + $this->view->showToggleIcon = $showToggleIcon; + $this->view->productList = $this->loadModel('product')->getProductPairsByProject($projectID, 'all', '', false); + $this->view->productID = $productID; + $this->view->product = $this->product->getByID($productID); + $this->view->projectID = $projectID; + $this->view->project = $project; + $this->view->projects = $projects; + $this->view->pager = $pager; + $this->view->orderBy = $orderBy; + $this->view->users = $this->loadModel('user')->getPairs('noletter'); + $this->view->status = $status; + $this->view->isStage = (isset($project->model) and ($project->model == 'waterfall' or $project->model == 'waterfallplus')) ? true : false; + $this->view->changeStatusHtml = common::hasPriv('execution', 'batchChangeStatus') ? $changeStatusHtml : ''; $this->display(); } diff --git a/module/project/js/execution.js b/module/project/js/execution.js index 49a94fd3f4..0f8faf74d9 100644 --- a/module/project/js/execution.js +++ b/module/project/js/execution.js @@ -229,7 +229,7 @@ function showEditCheckbox(show) if(show) { $('.table-nest-title').prepend("
").addClass('table-nest-title-edit'); - var tableFooter = "
"; + var tableFooter = "
" + changeStatusHtml + "
"; $('#executionForm').attr('action', createLink('execution', 'batchEdit')); $('.table-footer').prepend(tableFooter).show(); $('body').scroll(); @@ -242,3 +242,24 @@ function showEditCheckbox(show) $('#executionForm').removeAttr('action'); } } + +/** + * Set the color of the badge to white. + * + * @param object obj + * @param bool isShow + * @access public + * @return void + */ +function setBadgeStyle(obj, isShow) +{ + var $label = $(obj); + if(isShow == true) + { + $label.find('.label-badge').css({"color":"#fff", "border-color":"#fff"}); + } + else + { + $label.find('.label-badge').css({"color":"#838a9d", "border-color":"#838a9d"}); + } +} diff --git a/module/project/view/execution.html.php b/module/project/view/execution.html.php index 9485fb7828..c1eff7b9e3 100644 --- a/module/project/view/execution.html.php +++ b/module/project/view/execution.html.php @@ -13,6 +13,7 @@ execution->pageExecSummary);?> execution->executionSummary);?> execution->checkedExecutions);?> +