* Fix error of save WIP.

This commit is contained in:
liyuchun
2021-10-29 14:48:38 +08:00
parent 2e8baf8959
commit dfc29b5cb2
3 changed files with 8 additions and 4 deletions
+1
View File
@@ -17,6 +17,7 @@ $lang->kanban->columnColor = 'Column Color';
$lang->kanban->noColumnUniqueName = 'The Kanban column name already exists.';
$lang->kanban->error = new stdclass();
$lang->kanban->error->mustBeInt = 'The WIPs must be positive integer.';
$lang->kanban->error->parentLimitNote = 'The WIPs in the parent column cannot be < the sum of the WIPs in the child column.';
$lang->kanban->error->childLimitNote = 'The sum of products in the child column cannot be > the number of products in the parent column.';
+1
View File
@@ -50,6 +50,7 @@ $lang->kanban->columnColor = '看板列颜色';
$lang->kanban->noColumnUniqueName = '看板列名称已存在';
$lang->kanban->error = new stdclass();
$lang->kanban->error->mustBeInt = '在制品数量必须是正整数。';
$lang->kanban->error->parentLimitNote = '父列的在制品数量不能小于子列在制品数量之和';
$lang->kanban->error->childLimitNote = '子列在制品数量之和不能大于父列的在制品数量';
+6 -4
View File
@@ -491,10 +491,12 @@ class kanbanModel extends model
public function setWIP($columnID)
{
$oldColumn = $this->getColumnById($columnID);
$column = fixer::input('post')
->cleanInt('limit')
->remove('WIPCount,noLimit')
->get();
$column = fixer::input('post')->remove('WIPCount,noLimit')->get();
if(!preg_match("/^-?\d+$/", $column->limit))
{
dao::$errors['limit'] = $this->lang->kanban->error->mustBeInt;
return false;
}
/* Check column limit. */
$sumChildLimit = 0;