* Fix error of save WIP.
This commit is contained in:
@@ -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.';
|
||||
|
||||
|
||||
@@ -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 = '子列在制品数量之和不能大于父列的在制品数量';
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user