* Fix bug and add sql file.
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `zt_kanbanspace` ADD `type` varchar(50) NOT NULL AFTER `name`;
|
||||
UPDATE `zt_kanbanspace` SET `type` = 'cooperation';
|
||||
@@ -648,6 +648,7 @@ CREATE TABLE IF NOT EXISTS `zt_job` (
|
||||
CREATE TABLE `zt_kanbanspace` (
|
||||
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`type` varchar(50) NOT NULL,
|
||||
`owner` varchar(30) NOT NULL,
|
||||
`team` text NOT NULL,
|
||||
`desc` text NOT NULL,
|
||||
|
||||
@@ -302,13 +302,14 @@ class executionModel extends model
|
||||
if($project) $type = zget($this->config->execution->modelList, $project->model, 'sprint');
|
||||
|
||||
/* If the execution model is a stage, determine whether the product is linked. */
|
||||
if($type == 'stage' and empty(array_filter($this->post->products)))
|
||||
$products = array_filter($this->post->products);
|
||||
if($type == 'stage' and empty($products))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->noLinkProduct;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($type == 'kanban' and empty(array_filter($this->post->products)))
|
||||
if($type == 'kanban' and empty($products))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->kanbanNoLinkProduct;
|
||||
return false;
|
||||
@@ -470,13 +471,14 @@ class executionModel extends model
|
||||
return false;
|
||||
}
|
||||
|
||||
if($oldExecution->type == 'stage' and empty(array_filter($this->post->products)))
|
||||
$products = array_filter($this->post->products);
|
||||
if($oldExecution->type == 'stage' and empty($products))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->noLinkProduct;
|
||||
return false;
|
||||
}
|
||||
|
||||
if($oldExecution->type == 'kanban' and empty(array_filter($this->post->products)))
|
||||
if($oldExecution->type == 'kanban' and empty($products))
|
||||
{
|
||||
dao::$errors['message'][] = $this->lang->execution->kanbanNoLinkProduct;
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user