* Fix error of bug-batchEdit when saving bugs.
This commit is contained in:
@@ -155,7 +155,7 @@ $config->bug->form->batchCreate['browser'] = array('required' => false, 'ty
|
||||
$config->bug->form->batchCreate['keywords'] = array('required' => false, 'type' => 'string', 'default' => '');
|
||||
|
||||
$config->bug->form->batchEdit = common::formConfig('bug', 'batchEdit');
|
||||
$config->bug->form->batchEdit['id'] = array('required' => false, 'type' => 'int');
|
||||
$config->bug->form->batchEdit['id'] = array('required' => false, 'type' => 'int', 'base' => true);
|
||||
$config->bug->form->batchEdit['type'] = array('required' => false, 'type' => 'string', 'default' => '');
|
||||
$config->bug->form->batchEdit['severity'] = array('required' => false, 'type' => 'int', 'default' => 0);
|
||||
$config->bug->form->batchEdit['pri'] = array('required' => false, 'type' => 'int', 'default' => 0);
|
||||
|
||||
@@ -749,7 +749,7 @@ class bug extends control
|
||||
*/
|
||||
public function batchEdit(int $productID = 0, string $branch = '0')
|
||||
{
|
||||
if($this->post->title)
|
||||
if($this->post->id)
|
||||
{
|
||||
/* Build bugs. */
|
||||
$bugs = $this->bugZen->buildBugsForBatchEdit();
|
||||
@@ -761,8 +761,6 @@ class bug extends control
|
||||
return $this->send($this->bugZen->responseAfterBatchEdit($toTaskIdList));
|
||||
}
|
||||
|
||||
$_POST['bugIdList'] = array(21826, 21827, 21828);
|
||||
|
||||
/* If there is no bug ID, return to the previous step. */
|
||||
if(!$this->post->bugIdList) $this->locate($this->session->bugList);
|
||||
|
||||
|
||||
+1
-1
@@ -1799,7 +1799,7 @@ class bugZen extends bug
|
||||
protected function buildBugsForBatchEdit(): array
|
||||
{
|
||||
/* Get bug ID list. */
|
||||
$bugIdList = $this->post->bugIDList ? $this->post->bugIDList : array();
|
||||
$bugIdList = $this->post->id ? $this->post->id : array();
|
||||
if(empty($bugIdList)) return array();
|
||||
|
||||
/* Get bugs and old bugs. */
|
||||
|
||||
Reference in New Issue
Block a user