From a4e02734f6b5e6e20153ce64ace40c5f0d81e7d0 Mon Sep 17 00:00:00 2001 From: zhangzilong Date: Wed, 9 Feb 2022 15:03:33 +0800 Subject: [PATCH] * Code for bug 19255. --- module/bug/js/common.js | 2 +- module/bug/js/create.js | 8 ++++++++ module/bug/view/create.html.php | 2 +- 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/module/bug/js/common.js b/module/bug/js/common.js index b1bdde1edd..29bae7991f 100644 --- a/module/bug/js/common.js +++ b/module/bug/js/common.js @@ -277,7 +277,7 @@ function loadProductExecutions(productID, projectID = 0) $('#executionIdBox').load(link, function() { $(this).find('select').chosen(); - if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("" + bugExecution + ""); + if(typeof(bugExecution) == 'string' && systemMode != 'classic') $('#executionIdBox').prepend("" + bugExecution + ""); if(required) $(this).addClass('required'); }); loadProjectBuilds(projectID); diff --git a/module/bug/js/create.js b/module/bug/js/create.js index c9cdc7d5ec..53c35dfa43 100644 --- a/module/bug/js/create.js +++ b/module/bug/js/create.js @@ -161,8 +161,16 @@ $(function() $('#project').change(function() { var projectID = parseInt($(this).val()); + var link = createLink('bug', 'ajaxGetExecutionLang', 'projectID=' + projectID); projectID ? loadProjectTeamMembers(projectID) : loadExecutionTeamMembers($('#product').val()); + $.post(link, function(executionLang) + { + bugExecution = executionLang; + }) + }); + + }); $(window).unload(function(){ diff --git a/module/bug/view/create.html.php b/module/bug/view/create.html.php index ac4b74b829..7c86fbe8b5 100644 --- a/module/bug/view/create.html.php +++ b/module/bug/view/create.html.php @@ -108,7 +108,7 @@ if($this->app->tab == 'project') js::set('objectID', $projectID);
- model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?> + model) and $project->model == 'kanban') ? $lang->bug->kanban : $lang->bug->execution;?>