From 8219bc43d356c2c29acf1d338bb61d687b3cc5da Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 13 Sep 2021 09:52:24 +0800 Subject: [PATCH 1/5] * Fix bug #14966. --- module/execution/js/create.js | 19 +++++++++++++++---- module/execution/model.php | 13 ++----------- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/module/execution/js/create.js b/module/execution/js/create.js index 3904670691..6cd163c3ad 100644 --- a/module/execution/js/create.js +++ b/module/execution/js/create.js @@ -48,11 +48,22 @@ $(function() { if(systemMode == 'new') { - var maxWidth = $('.chosen-container .chosen-drop.chosen-auto-max-width.in').width() - 70; + $('#teams_chosen ul li').each(function(index) + { + if(index == 0) + { + var maxWidth = $('.chosen-container .chosen-drop.chosen-auto-max-width.in').width() - 70; - $('#teams_chosen ul .label').remove(); - $('#teams_chosen ul li:first').after(' '); - $('#teams_chosen ul > li:first').attr('style', 'display: inline-block; vertical-align: middle; max-width: ' + maxWidth + 'px'); + $('#teams_chosen ul .label').remove(); + $(this).after(' '); + $(this).attr('style', 'display: inline-block; vertical-align: middle; max-width: ' + maxWidth + 'px'); + } + else + { + $(this).html($(this).html().replace('   ', '')); + $(this).prepend('   '); + } + }) } }) diff --git a/module/execution/model.php b/module/execution/model.php index 8626205f41..3341621a83 100644 --- a/module/execution/model.php +++ b/module/execution/model.php @@ -2478,22 +2478,13 @@ class executionModel extends model { if(empty($projectID) and $this->config->systemMode == 'new') return array(); - $objects = $this->dao->select('id,name,type')->from(TABLE_PROJECT) + $teamPairs = $this->dao->select('id,name')->from(TABLE_PROJECT) ->where('deleted')->eq(0) ->andWhere('(project')->eq($projectID) ->orWhere('id')->eq($projectID) ->markRight(1) ->orderBy('project_asc') - ->fetchAll('id'); - - if(empty($objects)) return array(); - - $teamPairs = array(); - foreach($objects as $id => $object) - { - $prefix = ($object->type != 'project' and $this->config->systemMode == 'new') ? '   ' : ''; - $teamPairs[$id] = $prefix . $object->name; - } + ->fetchPairs(); return $teamPairs; } From 275a567b7ac29175c66014a1ac664f19c9584a79 Mon Sep 17 00:00:00 2001 From: tianshujie Date: Mon, 13 Sep 2021 10:12:53 +0800 Subject: [PATCH 2/5] * Modify function comment. --- module/task/js/editestimate.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/js/editestimate.js b/module/task/js/editestimate.js index 41cbc4f5c3..ddaf03ed54 100644 --- a/module/task/js/editestimate.js +++ b/module/task/js/editestimate.js @@ -2,7 +2,7 @@ * Confirm left. * * @access public - * @return void + * @return bool */ function confirmLeft() { From e2008d5c313119bf041eabd20256e4db00d76219 Mon Sep 17 00:00:00 2001 From: zenggang Date: Mon, 13 Sep 2021 10:23:05 +0800 Subject: [PATCH 3/5] * Fix bug#15099 --- module/task/model.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/task/model.php b/module/task/model.php index 0d4f6a220e..9e87c22359 100644 --- a/module/task/model.php +++ b/module/task/model.php @@ -3068,7 +3068,7 @@ class taskModel extends model echo $task->estStarted; break; case 'realStarted': - echo $task->realStarted; + echo substr($task->realStarted, 5, 11); break; case 'assignedTo': $this->printAssignedHtml($task, $users); From 4ed8765f385a09d02e0b4a1510d05e656648b785 Mon Sep 17 00:00:00 2001 From: hufangzhou Date: Mon, 13 Sep 2021 10:27:11 +0800 Subject: [PATCH 4/5] * Fix bug #15093. --- module/story/control.php | 2 +- module/story/model.php | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/module/story/control.php b/module/story/control.php index 00b0b366e6..8d531ad5b2 100644 --- a/module/story/control.php +++ b/module/story/control.php @@ -576,7 +576,7 @@ class story extends control $this->action->logHistory($actionID, $changes); $story = $this->dao->findById($storyID)->from(TABLE_STORY)->fetch(); - $this->story->recordReviewAction($story); + if(isset($this->post->reviewer)) $this->story->recordReviewAction($story); } $this->executeHooks($storyID); diff --git a/module/story/model.php b/module/story/model.php index bc8c614e39..6ab29fba3b 100644 --- a/module/story/model.php +++ b/module/story/model.php @@ -789,8 +789,8 @@ class storyModel extends model if(isset($_POST['reviewer'])) { - $_POST['reviewer'] = array_filter($_POST['reviewer']); - $oldReviewer = $this->getReviewerPairs($storyID, $oldStory->version); + $_POST['reviewer'] = array_filter($_POST['reviewer']); + $oldReviewer = $this->getReviewerPairs($storyID, $oldStory->version); if(array_diff($_POST['reviewer'], array_keys($oldReviewer)) or array_diff(array_keys($oldReviewer), $_POST['reviewer'])) { /* Update story reviewer. */ @@ -4446,7 +4446,7 @@ class storyModel extends model { if($story->status == 'closed') $this->action->create('story', $story->id, 'ReviewRejected'); if($story->status == 'active') $this->action->create('story', $story->id, 'ReviewPassed'); - if(!array_diff(array_keys($reviewers), $reviewedBy) and ($story->status == 'draft' || $story->status == 'changed')) $this->action->create('story', $story->id, 'ReviewClarified'); + if(!array_diff(array_keys($reviewers), $reviewedBy) and ($story->status == 'draft' or $story->status == 'changed')) $this->action->create('story', $story->id, 'ReviewClarified'); } return $actionID; From 4e3933ddad317b561a51c85f5e6f124afdb836e7 Mon Sep 17 00:00:00 2001 From: liyuchun Date: Mon, 13 Sep 2021 11:08:23 +0800 Subject: [PATCH 5/5] * Fix bug #15106. --- module/misc/css/features.css | 5 +++-- module/misc/view/features.html.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/module/misc/css/features.css b/module/misc/css/features.css index 0873d230b7..d4269cd814 100644 --- a/module/misc/css/features.css +++ b/module/misc/css/features.css @@ -10,8 +10,9 @@ #featuresCarousel {padding: 0 50px;} #featuresCarousel .carousel-indicators {bottom: 0;} #featuresCarousel .carousel-indicators li {border-color: #d8d8d8; background-color: #d8d8d8; width: 12px; height: 12px;} -#featuresCarousel .carousel-indicators li + li {margin-left: 10px;} -#featuresCarousel .carousel-indicators .active {border-color: #73b1df; background-color: #73b1df; } +#featuresCarousel .carousel-indicators li + li {margin-left: 10px !important;} +#featuresCarousel .carousel-indicators .active {border-color: #73b1df; background-color: #73b1df; margin: 1px;} +#featuresCarousel .carousel-inner .download-file {position: absolute; right: 95px; bottom: 0; font-size: 12px;} #features [data-slide-to] {pointer-events: none;} #features.enabled [data-slide-to] {pointer-events: auto;} diff --git a/module/misc/view/features.html.php b/module/misc/view/features.html.php index 676df61b85..0f70bc6326 100644 --- a/module/misc/view/features.html.php +++ b/module/misc/view/features.html.php @@ -25,7 +25,7 @@

install->introduction;?>

-