This commit is contained in:
@@ -954,12 +954,12 @@ class storyModel extends model
|
||||
if($this->config->vision != 'or')
|
||||
{
|
||||
/* Unchanged product when editing requirements on site. */
|
||||
$storyProjectID = $this->dao->select('t2.hasProduct')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
$hasProduct = $this->dao->select('t2.hasProduct')->from(TABLE_PROJECTPRODUCT)->alias('t1')
|
||||
->leftJoin(TABLE_PROJECT)->alias('t2')->on('t1.project = t2.id')
|
||||
->where('t1.product')->eq($oldStory->product)
|
||||
->andWhere('t2.deleted')->eq(0)
|
||||
->fetch();
|
||||
$_POST['product'] = ($storyProjectID and !$storyProjectID->hasProduct) ? $oldStory->product : $this->post->product;
|
||||
->fetch('hasProduct');
|
||||
$_POST['product'] = (!empty($hasProduct) && !$hasProduct) ? $oldStory->product : $this->post->product;
|
||||
}
|
||||
|
||||
$story = fixer::input('post')
|
||||
@@ -5069,7 +5069,7 @@ class storyModel extends model
|
||||
$tab = $this->app->tab;
|
||||
$executionID = empty($execution) ? $this->session->execution : $execution->id;
|
||||
$account = $this->app->user->account;
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=&storyType=$story->type");
|
||||
$storyLink = helper::createLink('story', 'view', "storyID=$story->id&version=0¶m=&storyType=$story->type") . "#app=$tab";
|
||||
$canView = common::hasPriv($story->type, 'view', null, "storyType=$story->type");
|
||||
if($this->config->vision == 'or') $this->app->loadLang('demand');
|
||||
|
||||
|
||||
@@ -150,7 +150,8 @@
|
||||
<th class='thWidth'><?php echo $lang->story->product;?></th>
|
||||
<td id='productBox'>
|
||||
<div class='input-group'>
|
||||
<?php echo html::select('product', $products, $story->product, "onchange='loadProduct(this.value);' class='form-control chosen control-product'");?>
|
||||
<?php $class = $hiddenProduct ? 'disabled' : ''?>
|
||||
<?php echo html::select('product', $products, $story->product, "onchange='loadProduct(this.value);' class='form-control chosen control-product $class'");?>
|
||||
<span class='input-group-addon fix-border fix-padding'></span>
|
||||
<?php if($product->type != 'normal') echo html::select('branch', $branchTagOption, $story->branch, "onchange='loadBranch();' class='form-control chosen control-branch'");?>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user