* Fix error of bug-batchEdit when saving bugs.

This commit is contained in:
liumengyi
2023-05-30 09:56:35 +08:00
parent 67b5e7c03a
commit ee1a7ebf86
3 changed files with 3 additions and 5 deletions
+1 -1
View File
@@ -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);
+1 -3
View File
@@ -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
View File
@@ -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. */