diff --git a/module/bug/control.php b/module/bug/control.php index 76f9ee2e47..77185c8bad 100644 --- a/module/bug/control.php +++ b/module/bug/control.php @@ -2236,15 +2236,17 @@ class bug extends control * Ajax get project team members. * * @param int $projectID + * @param string $$selectedUser * @access public - * @return void + * @return string */ - public function ajaxGetProjectTeamMembers($projectID) + public function ajaxGetProjectTeamMembers($projectID, $selectedUser = '') { $users = $this->loadModel('user')->getPairs('noclosed'); $teamMembers = empty($projectID) ? array() : $this->loadModel('project')->getTeamMemberPairs($projectID); foreach($teamMembers as $account => $member) $teamMembers[$account] = $users[$account]; - return print(html::select('assignedTo', $teamMembers, '', 'class="form-control"')); + + return print(html::select('assignedTo', $teamMembers, $selectedUser, 'class="form-control"')); } diff --git a/module/bug/js/common.js b/module/bug/js/common.js index 9b4b38b923..39a5065509 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -29,11 +29,7 @@ $(function() */ function loadAll(productID) { - if(page == 'create') - { - loadExecutionTeamMembers(productID); - setAssignedTo(); - } + if(page == 'create') loadExecutionTeamMembers(productID, true); if(typeof(changeProductConfirmed) != 'undefined' && !changeProductConfirmed) { @@ -485,7 +481,7 @@ function loadExecutionBuilds(executionID) */ function loadProjectTeamMembers(projectID) { - link = createLink('bug', 'ajaxGetProjectTeamMembers', 'projectID=' + projectID); + link = createLink('bug', 'ajaxGetProjectTeamMembers', 'projectID=' + projectID + '&selectedUser=' + $('#assignedTo').val()); $.get(link, function(data) { if(!data) data = ''; diff --git a/module/bug/js/create.js b/module/bug/js/create.js index 710b877545..1b381ac281 100644 --- a/module/bug/js/create.js +++ b/module/bug/js/create.js @@ -25,10 +25,11 @@ function loadAllUsers() * Load team members of the latest execution of a product as assignedTo list. * * @param int $productID + * @param bool $changeProduct * @access public * @return void */ -function loadExecutionTeamMembers(productID) +function loadExecutionTeamMembers(productID, changeProduct) { var link = createLink('bug', 'ajaxLoadExecutionTeamMembers', 'productID=' + productID + '&selectedUser=' + $('#assignedTo').val()); $.post(link, function(data) @@ -36,6 +37,7 @@ function loadExecutionTeamMembers(productID) $('#assignedTo').replaceWith(data); $('#assignedTo_chosen').remove(); $('#assignedTo').chosen(); + if(typeof(changeProduct) != undefined && changeProduct) setAssignedTo(); }) } diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index c33c1a9f2a..ca57e65f41 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -124,7 +124,9 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
bug->openedBuild?> + +
bug->allBuilds, "class='btn' id='all' data-toggle='tooltip' onclick='loadAllBuilds()'")?>
diff --git a/module/my/control.php b/module/my/control.php index 95d130dc23..92be67f2b1 100644 --- a/module/my/control.php +++ b/module/my/control.php @@ -499,7 +499,7 @@ EOF; $this->view->position[] = $this->lang->my->bug; $this->view->bugs = $bugs; $this->view->users = $this->user->getPairs('noletter'); - $this->view->memberPairs = $this->user->getPairs('noletter|nodeleted'); + $this->view->memberPairs = $this->user->getPairs('noletter|nodeleted|noclosed'); $this->view->tabID = 'bug'; $this->view->type = $type; $this->view->recTotal = $recTotal; diff --git a/module/my/view/buildcontactlists.html.php b/module/my/view/buildcontactlists.html.php index 4500d2b2bd..1a210b3245 100644 --- a/module/my/view/buildcontactlists.html.php +++ b/module/my/view/buildcontactlists.html.php @@ -17,8 +17,9 @@ if($contactLists) } else { + $width = isonlybody() ? 'data-width=100%' : ''; echo ''; - echo '"; + echo '"; echo ''; echo ''; echo ''; diff --git a/module/story/view/batchedit.html.php b/module/story/view/batchedit.html.php index 10f90a4e11..069f8d94bb 100644 --- a/module/story/view/batchedit.html.php +++ b/module/story/view/batchedit.html.php @@ -148,7 +148,7 @@ foreach(explode(',', $showFields) as $field) - app->tab == 'product' ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?> + app->tab == 'product' or $this->app->tab == 'execution') ? html::a($this->session->storyList, $lang->goback, '', "class='btn btn-back btn-wide'") : html::backButton();?>