* Fix bug#27244.
This commit is contained in:
@@ -56,7 +56,7 @@ $config->bug->custom->createFields = $config->bug->list->customCreateFields
|
||||
$config->bug->custom->batchCreateFields = 'project,execution,deadline,steps,type,severity,os,browser,%s';
|
||||
$config->bug->custom->batchEditFields = 'type,severity,pri,assignedTo,deadline,status,resolvedBy,resolution';
|
||||
|
||||
$config->bug->excludeCheckFileds = ',severities,';
|
||||
$config->bug->excludeCheckFileds = ',severities,oses,browsers,';
|
||||
|
||||
$config->bug->editor = new stdclass();
|
||||
$config->bug->editor->create = array('id' => 'steps', 'tools' => 'bugTools');
|
||||
|
||||
+7
-10
@@ -167,6 +167,12 @@ class bugModel extends model
|
||||
$pri = 0;
|
||||
foreach($data->title as $i => $title)
|
||||
{
|
||||
if(empty($title) and $this->common->checkValidRow('bug', $data, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->bug->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
$oses = array_filter($data->oses[$i]);
|
||||
$browsers = array_filter($data->browsers[$i]);
|
||||
|
||||
@@ -192,16 +198,7 @@ class bugModel extends model
|
||||
foreach($data->title as $i => $title)
|
||||
{
|
||||
$title = trim($title);
|
||||
if(empty($title))
|
||||
{
|
||||
if($this->common->checkValidRow('bug', $data, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->bug->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
if(empty($title)) continue;
|
||||
|
||||
$bug = new stdClass();
|
||||
$bug->openedBy = $this->app->user->account;
|
||||
|
||||
+7
-10
@@ -473,6 +473,12 @@ class storyModel extends model
|
||||
|
||||
foreach($stories->title as $i => $title)
|
||||
{
|
||||
if(empty($title) and $this->common->checkValidRow('story', $stories, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->story->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
$module = $stories->module[$i] == 'ditto' ? $module : $stories->module[$i];
|
||||
$plan = isset($stories->plan[$i]) ? ($stories->plan[$i] == 'ditto' ? $plan : $stories->plan[$i]) : '';
|
||||
$pri = $stories->pri[$i] == 'ditto' ? $pri : $stories->pri[$i];
|
||||
@@ -490,16 +496,7 @@ class storyModel extends model
|
||||
$reviewers = '';
|
||||
foreach($stories->title as $i => $title)
|
||||
{
|
||||
if(empty($title))
|
||||
{
|
||||
if($this->common->checkValidRow('story', $stories, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->story->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
if(empty($title)) continue;
|
||||
|
||||
if(empty($stories->reviewer[$i]) and empty($stories->reviewerDitto[$i])) $stories->reviewer[$i] = array();
|
||||
$reviewers = (isset($stories->reviewDitto[$i])) ? $reviewers : $stories->reviewer[$i];
|
||||
|
||||
@@ -138,6 +138,12 @@ class testcaseModel extends model
|
||||
$pri = 3;
|
||||
foreach($cases->title as $i => $title)
|
||||
{
|
||||
if(empty($title) and $this->common->checkValidRow('testcase', $cases, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->testcase->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
$module = $cases->module[$i] == 'ditto' ? $module : $cases->module[$i];
|
||||
$story = $cases->story[$i] == 'ditto' ? $story : $cases->story[$i];
|
||||
$type = $cases->type[$i] == 'ditto' ? $type : $cases->type[$i];
|
||||
@@ -155,16 +161,7 @@ class testcaseModel extends model
|
||||
$data = array();
|
||||
foreach($cases->title as $i => $title)
|
||||
{
|
||||
if(empty($title))
|
||||
{
|
||||
if($this->common->checkValidRow('testcase', $cases, $i))
|
||||
{
|
||||
dao::$errors['message'][] = sprintf($this->lang->error->notempty, $this->lang->testcase->title);
|
||||
return false;
|
||||
}
|
||||
|
||||
continue;
|
||||
}
|
||||
if(empty($title)) continue;
|
||||
|
||||
$data[$i] = new stdclass();
|
||||
$data[$i]->product = $productID;
|
||||
|
||||
Reference in New Issue
Block a user