This commit is contained in:
田淑杰
2023-03-20 14:05:20 +08:00
parent 55aba37fbb
commit a142ed9064
3 changed files with 11 additions and 3 deletions

View File

@@ -1260,6 +1260,7 @@ class bug extends control
/* Set plans. */
foreach($bugs as $bug)
{
$projectID = $bug->project;
$plans = $this->loadModel('productplan')->getPairs($productID, $bug->branch, '', true);
$plans = array('' => '', 'ditto' => $this->lang->bug->ditto) + $plans;
$bug->plans = $plans;
@@ -1282,6 +1283,13 @@ class bug extends control
/* Set product menu. */
$this->qa->setMenu($this->products, $productID, $branch);
$project = $this->loadModel('project')->getByID($projectID);
if($product->shadow and isset($project) and empty($project->multiple))
{
$this->config->bug->custom->batchEditFields = str_replace('productplan', '', $this->config->bug->custom->batchEditFields);
$this->config->bug->list->customBatchEditFields = str_replace(',productplan,', ',', $this->config->bug->list->customBatchEditFields);
}
$this->view->title = $product->name . $this->lang->colon . "BUG" . $this->lang->bug->batchEdit;
$this->view->position[] = html::a($this->createLink('bug', 'browse', "productID=$productID&branch=$branch"), $this->products[$productID]);
$this->view->plans = $plans;
@@ -1325,7 +1333,7 @@ class bug extends control
$showSuhosinInfo = common::judgeSuhosinSetting($countInputVars);
if($showSuhosinInfo) $this->view->suhosinInfo = extension_loaded('suhosin') ? sprintf($this->lang->suhosinInfo, $countInputVars) : sprintf($this->lang->maxVarsInfo, $countInputVars);
/* Set Custom*/
/* Set Custom. */
foreach(explode(',', $this->config->bug->list->customBatchEditFields) as $field) $customFields[$field] = $this->lang->bug->$field;
$this->view->customFields = $customFields;
$this->view->showFields = $this->config->bug->custom->batchEditFields;

View File

@@ -32,7 +32,7 @@
$requiredFields = array();
foreach(explode(',', $showFields) as $field)
{
if($field)$visibleFields[$field] = '';
if($field) $visibleFields[$field] = '';
}
foreach(explode(',', $config->bug->edit->requiredFields) as $field)
{

View File

@@ -125,7 +125,7 @@ if($this->app->tab == 'project') js::set('objectID', $bug->project);
</div>
</td>
</tr>
<tr class='<?php if($product->shadow and isset($project) and $project->multiple) echo 'hide'?>'>
<tr class='<?php if($product->shadow and isset($project) and empty($project->multiple)) echo 'hide'?>'>
<th><?php echo $lang->bug->productplan;?></th>
<td>
<span id="planIdBox"><?php echo html::select('plan', $plans, $bug->plan, "class='form-control chosen'");?></span>