Merge branch '20.x' of github.com:easysoft/zentaopms into 20.x

This commit is contained in:
z
2020-08-25 16:39:02 +08:00
7 changed files with 192 additions and 11 deletions
+27 -7
View File
@@ -35,6 +35,17 @@ $lang->program->begin = 'Begin';
$lang->program->end = 'End';
$lang->program->status = 'Status';
$lang->program->PM = 'Project Manager';
$lang->program->create = 'Create';
$lang->program->createGuide = 'Select the project template';
$lang->program->browse = 'Program List';
$lang->program->edit = 'Edit';
$lang->program->all = 'All';
$lang->program->start = 'Start';
$lang->program->finish = 'Finish';
$lang->program->suspend = 'Suspend';
$lang->program->delete = 'Delete';
$lang->program->close = 'Close';
$lang->program->activate = 'Activate';
$lang->program->budget = 'Budget';
$lang->program->dateRange = 'Date Range';
$lang->program->to = ' to ';
@@ -66,6 +77,11 @@ $lang->program->sv = 'SV%';
$lang->program->ac = 'AC';
$lang->program->cv = 'CV%';
$lang->program->pm = 'PM';
$lang->program->manageGroupMember = 'Manage Group Members';
$lang->program->durationEstimation = 'Workload estimate';
$lang->program->noProgram = 'No projects';
$lang->program->accessDenied = 'You do not have access to this project!';
$lang->program->teamCount = 'The Number Of Team';
$lang->program->unitList[''] = '';
@@ -96,8 +112,8 @@ $lang->program->statusList['doing'] = 'Doing';
$lang->program->statusList['suspended'] = 'Suspended';
$lang->program->statusList['closed'] = 'Closed';
$lang->program->noProgram = 'No Program';
$lang->program->accessDenied = 'Has No Access To The Program';
$lang->program->noProgram = 'No Program';
$lang->program->accessDenied = 'Has No Access To The Program';
$lang->program->chooseProgramType = 'Choose management type';
$lang->program->nextStep = 'Next step';
$lang->program->hoursUnit = '%s hours';
@@ -110,9 +126,13 @@ $lang->program->scrumDesc = '<strong>Introduction: </strong>Iterate in s
$lang->program->cmmi = 'CMMI';
$lang->program->cmmiTitle = 'CMMI management';
$lang->program->cmmiDesc = '<strong>Introduction: </strong>Standardized management by stages<br><strong>Contains function points: </strong>Estimate, plan, stage, report, etc.';
$lang->program->cannotCreateChild = 'The project already has actual content and can not add subprojects directly. You can create a parent project for the current project and then add a child project under the new parent project.';
$lang->program->hasChildren = 'This project has a subproject and can not be deleted.';
$lang->program->confirmDelete = 'Do you want to delete this project?';
$lang->program->cannotCreateChild = 'The project already has actual content and can not add subprojects directly. You can create a parent project for the current project and then add a child project under the new parent project.';
$lang->program->hasChildren = 'This project has a subproject and can not be deleted.';
$lang->program->confirmDelete = 'Do you want to delete this project?';
$lang->program->emptyPM = 'No program manager';
$lang->program->cannotChangeToCat = "The project already has the actual content and can not be modified as a parent project";
$lang->program->cannotCancelCat = "There are already children under this project. You can not unmark the parent project";
$lang->program->hasChildren = 'This project has a subproject and can not be deleted.';
$lang->program->confirmDelete = "Are you sure you want to delete the item [% s ] ?";
$lang->program->cannotChangeToCat = "The project already has the actual content and can not be modified as a parent project";
$lang->program->cannotCancelCat = "There are already children under this project. You can not unmark the parent project";
$lang->program->cannotChangeToCat = "The project already has the actual content and can not be modified as a parent project";
$lang->program->cannotCancelCat = "There are already children under this project. You can not unmark the parent project";
+19 -2
View File
@@ -69,10 +69,11 @@ class programModel extends model
* @param varchar $status
* @param varchar $orderBy
* @param int $limit
* @param int $programID
* @access public
* @return void
*/
public function getUserPrograms($status = 'all', $orderBy = 'id_desc', $limit = 15)
public function getUserPrograms($status = 'all', $orderBy = 'id_desc', $limit = 15, $programID = 0)
{
$programs = $this->dao->select('*')->from(TABLE_PROJECT)
->where('iscat')->eq(0)
@@ -81,6 +82,7 @@ class programModel extends model
->andWhere('deleted')->eq(0)
->beginIF(!$this->app->user->admin)->andWhere('id')->in($this->app->user->view->programs)->fi()
->beginIF($status != 'all')->andWhere('status')->eq($status)->fi()
->beginIF($programID)->andWhere('id')->eq($programID)->fi()
->orderBy($orderBy)
->limit($limit)
->fetchAll('id');
@@ -136,8 +138,21 @@ class programModel extends model
->groupBy('program')
->fetchAll('program');
$allBugs = $this->dao->select('program, count(*) as allBugs')->from(TABLE_BUG)
->where('program')->in($programIdList)
->andWhere('deleted')->eq(0)
->groupBy('program')
->fetchAll('program');
$doneBugs = $this->dao->select('program, count(*) as doneBugs')->from(TABLE_BUG)
->where('program')->in($programIdList)
->andWhere('deleted')->eq(0)
->andWhere('status')->eq('resolved')
->groupBy('program')
->fetchAll('program');
foreach($programs as $programID => $program)
{
{
$program->teamCount = isset($teams[$programID]) ? $teams[$programID]->count : 0;
$program->consumed = isset($hours[$programID]) ? $hours[$programID]->consumed : 0;
$program->estimate = isset($hours[$programID]) ? $hours[$programID]->estimate : 0;
@@ -146,6 +161,8 @@ class programModel extends model
$program->doneStories = isset($doneStories[$programID]) ? $doneStories[$programID]->doneStories : 0;
$program->leftStories = isset($leftStories[$programID]) ? $leftStories[$programID]->leftStories : 0;
$program->leftBugs = isset($leftBugs[$programID]) ? $leftBugs[$programID]->leftBugs : 0;
$program->allBugs = isset($allBugs[$programID]) ? $allBugs[$programID]->allBugs : 0;
$program->doneBugs = isset($doneBugs[$programID]) ? $doneBugs[$programID]->doneBugs : 0;
}
return $programs;