* Task #3446
This commit is contained in:
@@ -6,7 +6,7 @@ $config->bug->longlife = 7;
|
||||
$config->bug->create = new stdclass();
|
||||
$config->bug->edit = new stdclass();
|
||||
$config->bug->resolve = new stdclass();
|
||||
$config->bug->create->requiredFields = 'title,openedBuild';
|
||||
$config->bug->create->requiredFields = 'title,openedBuild,module';
|
||||
$config->bug->edit->requiredFields = $config->bug->create->requiredFields;
|
||||
$config->bug->resolve->requiredFields = 'resolution';
|
||||
|
||||
|
||||
@@ -328,6 +328,9 @@ class bug extends control
|
||||
$projectMembers = $this->view->users;
|
||||
}
|
||||
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
|
||||
|
||||
/* Set custom. */
|
||||
foreach(explode(',', $this->config->bug->list->customCreateFields) as $field) $customFields[$field] = $this->lang->bug->$field;
|
||||
$this->view->customFields = $customFields;
|
||||
@@ -339,7 +342,7 @@ class bug extends control
|
||||
|
||||
$this->view->productID = $productID;
|
||||
$this->view->productName = $this->products[$productID];
|
||||
$this->view->moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'bug', $startModuleID = 0, $branch);
|
||||
$this->view->moduleOptionMenu = $moduleOptionMenu;
|
||||
$this->view->stories = $stories;
|
||||
$this->view->projects = $this->product->getProjectPairs($productID, $branch ? "0,$branch" : 0, $params = 'nodeleted');
|
||||
$this->view->builds = $builds;
|
||||
|
||||
@@ -78,7 +78,7 @@ function loadBranch()
|
||||
$('#taskIdBox').innerHTML = '<select id="task"></select>'; // Reset the task.
|
||||
$('#task').chosen(defaultChosenOptions);
|
||||
productID = $('#product').val();
|
||||
loadProductModules(productID);
|
||||
loadProductModules(productID);
|
||||
loadProductProjects(productID);
|
||||
loadProductBuilds(productID);
|
||||
loadProductplans(productID);
|
||||
|
||||
@@ -113,7 +113,11 @@ class bugModel extends model
|
||||
|
||||
for($i = 0; $i < $batchNum; $i++)
|
||||
{
|
||||
if(!empty($data->title[$i]) and empty($data->openedBuilds[$i])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->openedBuild)));
|
||||
if(!empty($data->title[$i]))
|
||||
{
|
||||
if(empty($data->modules[$i])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->module)));
|
||||
if(empty($data->openedBuilds[$i])) die(js::alert(sprintf($this->lang->error->notempty, $this->lang->bug->openedBuild)));
|
||||
}
|
||||
}
|
||||
|
||||
/* Get pairs(moduleID => moduleOwner) for bug. */
|
||||
|
||||
@@ -39,7 +39,7 @@ foreach(explode(',', $showFields) as $field)
|
||||
<tr>
|
||||
<th class='w-50px'> <?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'> <?php echo $lang->product->branch;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'module', ' hidden')?>'> <?php echo $lang->bug->module;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, 'module', ' hidden')?>'> <?php echo $lang->bug->module;?> <span class='required'></span></th>
|
||||
<th class='w-130px<?php echo zget($visibleFields, 'project', ' hidden')?>'><?php echo $lang->bug->project;?></th>
|
||||
<th><?php echo $lang->bug->openedBuild;?> <span class='required'></span></th>
|
||||
<th><?php echo $lang->bug->title;?> <span class='required'></span></th>
|
||||
|
||||
@@ -13,7 +13,7 @@ $config->story->edit = new stdclass();
|
||||
$config->story->change = new stdclass();
|
||||
$config->story->close = new stdclass();
|
||||
$config->story->review = new stdclass();
|
||||
$config->story->create->requiredFields = 'title';
|
||||
$config->story->create->requiredFields = 'title,module';
|
||||
$config->story->change->requiredFields = 'title';
|
||||
$config->story->close->requiredFields = 'closedReason';
|
||||
$config->story->review->requiredFields = 'assignedTo,reviewedBy';
|
||||
|
||||
@@ -102,6 +102,7 @@ class story extends control
|
||||
|
||||
$users = $this->user->getPairs('pdfirst|noclosed|nodeleted');
|
||||
$moduleOptionMenu = $this->tree->getOptionMenu($productID, $viewType = 'story', 0, $branch);
|
||||
if(empty($moduleOptionMenu)) die(js::locate(helper::createLink('tree', 'browse', "productID=$productID&view=story")));
|
||||
|
||||
/* Set menu. */
|
||||
$this->product->setMenu($products, $product->id, $branch);
|
||||
|
||||
@@ -258,8 +258,13 @@ class storyModel extends model
|
||||
$plan = 0;
|
||||
$pri = 0;
|
||||
$source = '';
|
||||
|
||||
for($i = 0; $i < $batchNum; $i++)
|
||||
{
|
||||
if(!empty($stories->title[$i]) && empty($stories->modules[$i]))
|
||||
{
|
||||
die(js::alert(sprintf($this->lang->error->notempty, $this->lang->story->module)));
|
||||
}
|
||||
$module = $stories->module[$i] == 'ditto' ? $module : $stories->module[$i];
|
||||
$plan = $stories->plan[$i] == 'ditto' ? $plan : $stories->plan[$i];
|
||||
$pri = $stories->pri[$i] == 'ditto' ? $pri : $stories->pri[$i];
|
||||
|
||||
@@ -40,7 +40,7 @@ if($this->story->checkForceReview()) unset($visibleFields['review']);
|
||||
<tr class='text-center'>
|
||||
<th class='w-30px'><?php echo $lang->idAB;?></th>
|
||||
<th class='w-120px<?php echo zget($visibleFields, $product->type, ' hidden')?>'><?php echo $lang->product->branch;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->story->module;?></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'module', ' hidden')?>'><?php echo $lang->story->module;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'plan', ' hidden')?>'><?php echo $lang->story->plan;?></th>
|
||||
<th <?php if(count($visibleFields) >= 9) echo "class='w-150px'"?>><?php echo $lang->story->title;?> <span class='required'></span></th>
|
||||
<th class='w-p15<?php echo zget($visibleFields, 'spec', ' hidden')?>'><?php echo $lang->story->spec;?></th>
|
||||
|
||||
@@ -112,7 +112,7 @@ class treeModel extends model
|
||||
ksort($treeMenu);
|
||||
$topMenu = @array_shift($treeMenu);
|
||||
$topMenu = explode("\n", trim($topMenu));
|
||||
$lastMenu[] = '/';
|
||||
$lastMenu[] = in_array($type, array('bug', 'story')) ? '' : '/';
|
||||
foreach($topMenu as $menu)
|
||||
{
|
||||
if(!strpos($menu, '|')) continue;
|
||||
|
||||
Reference in New Issue
Block a user