* Finish task#37522
This commit is contained in:
@@ -228,6 +228,7 @@ function loadProductStories(productID)
|
||||
{
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
if(typeof(oldStoryID) == 'undefined') oldStoryID = 0;
|
||||
link = createLink('story', 'ajaxGetProductStories', 'productID=' + productID + '&branch=' + branch + '&moduleId=0&storyID=' + oldStoryID);
|
||||
$('#storyIdBox').load(link, function(){$('#story').chosen();});
|
||||
}
|
||||
@@ -243,7 +244,8 @@ function loadProductProjects(productID)
|
||||
{
|
||||
if(systemMode == 'classic')
|
||||
{
|
||||
loadProductExecutions(productID);
|
||||
var projectID = $('#execution').find("option:selected").val();
|
||||
loadProductExecutions(productID, projectID);
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -269,8 +271,6 @@ function loadProductProjects(productID)
|
||||
*/
|
||||
function loadProductExecutions(productID, projectID = 0)
|
||||
{
|
||||
if(!projectID && systemMode != 'classic') projectID = $('#project').find("option:selected").val();
|
||||
if(!projectID && systemMode != 'classic') productID = 0;
|
||||
required = $('#execution_chosen').hasClass('required');
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
@@ -390,6 +390,7 @@ function loadExecutionStories(executionID)
|
||||
{
|
||||
branch = $('#branch').val();
|
||||
if(typeof(branch) == 'undefined') branch = 0;
|
||||
if(typeof(oldStoryID) == 'undefined') oldStoryID = 0;
|
||||
link = createLink('story', 'ajaxGetExecutionStories', 'executionID=' + executionID + '&productID=' + $('#product').val() + '&branch=' + branch + '&moduleID=0&storyID=' + oldStoryID);
|
||||
$('#storyIdBox').load(link, function(){$('#story').chosen();});
|
||||
}
|
||||
|
||||
@@ -821,8 +821,8 @@ class productModel extends model
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($productID)
|
||||
->andWhere('t2.type')->eq('project')
|
||||
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
|
||||
->beginIF(!$this->app->user->admin)->andWhere('t2.id')->in($this->app->user->view->projects)->fi()
|
||||
->beginIF($branch)->andWhere('t1.branch')->in($branch)->fi()
|
||||
->andWhere('t2.deleted')->eq('0')
|
||||
->fetchPairs();
|
||||
}
|
||||
@@ -961,7 +961,7 @@ class productModel extends model
|
||||
public function getExecutionPairsByProduct($productID, $branch = 0, $orderBy = 'id_asc', $projectID = 0)
|
||||
{
|
||||
if(empty($productID)) return array();
|
||||
if(empty($projectID)) return $this->getAllExecutionPairsByProduct($productID, $branch);
|
||||
if(empty($projectID) or $this->config->systemMode == 'classic') return $this->getAllExecutionPairsByProduct($productID, $branch);
|
||||
|
||||
$project = $this->loadModel('project')->getByID($projectID);
|
||||
$orderBy = $project->model == 'waterfall' ? 'begin_asc,id_asc' : 'begin_desc,id_desc';
|
||||
|
||||
@@ -257,7 +257,6 @@
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<?php if(isset($execution)) js::set('execution', $execution);?>
|
||||
<?php js::set('executionID', $objectID);?>
|
||||
<?php js::set('storyModule', $lang->story->module);?>
|
||||
<?php js::set('storyType', $type);?>
|
||||
|
||||
Reference in New Issue
Block a user