* code for task #49697.
This commit is contained in:
@@ -1695,12 +1695,14 @@ class kanban extends control
|
||||
* @access public
|
||||
* @return string
|
||||
*/
|
||||
public function ajaxGetLanes($regionID, $type = 'all')
|
||||
public function ajaxGetLanes($regionID, $type = 'all', $field = 'otherLane', $i = 0)
|
||||
{
|
||||
$lanes = $this->kanban->getLanePairsByRegion($regionID, $type);
|
||||
|
||||
if(empty($lanes)) return;
|
||||
return print(html::select('otherLane', $lanes, '', "class='form-control'"));
|
||||
if($i) return print(html::select($field . "[$i]", $lanes, '', "class='form-control'"));
|
||||
|
||||
return print(html::select($field, $lanes, '', "class='form-control'"));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -1825,7 +1825,7 @@ class kanbanModel extends model
|
||||
{
|
||||
return $this->dao->select('id, name')->from(TABLE_KANBANLANE)
|
||||
->where('deleted')->eq('0')
|
||||
->andWhere('region')->eq($regionID)
|
||||
->andWhere('region')->in($regionID)
|
||||
->beginIF($type != 'all')->andWhere('type')->eq($type)->fi()
|
||||
->fetchPairs();
|
||||
}
|
||||
|
||||
+16
-2
@@ -247,6 +247,13 @@ class taskModel extends model
|
||||
$preStory = 0;
|
||||
$tasks = fixer::input('post')->get();
|
||||
|
||||
if($this->config->vision == 'lite')
|
||||
{
|
||||
$lanes = $tasks->lane;
|
||||
$columns = $tasks->column;
|
||||
unset($tasks->lane);
|
||||
unset($tasks->column);
|
||||
}
|
||||
$extra = str_replace(array(',', ' '), array('&', ''), $extra);
|
||||
parse_str($extra, $output);
|
||||
|
||||
@@ -405,7 +412,14 @@ class taskModel extends model
|
||||
|
||||
$this->executeHooks($taskID);
|
||||
|
||||
if(isset($output['laneID']) and isset($output['columnID'])) $this->kanban->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'task', $taskID);
|
||||
if($this->config->vision == 'lite')
|
||||
{
|
||||
$this->kanban->addKanbanCell($executionID, $lanes[$i], $columns[$i], 'task', $taskID);
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isset($output['laneID']) and isset($output['columnID'])) $this->kanban->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'task', $taskID);
|
||||
}
|
||||
|
||||
$actionID = $this->action->create('task', $taskID, 'Opened', '');
|
||||
if(!dao::isError()) $this->loadModel('score')->create('task', 'create', $taskID);
|
||||
@@ -459,7 +473,7 @@ class taskModel extends model
|
||||
if(!empty($changes)) $this->action->logHistory($actionID, $changes);
|
||||
}
|
||||
|
||||
if(!isset($output['laneID']) or !isset($output['columnID'])) $this->kanban->updateLane($executionID, 'task');
|
||||
if(!isset($output['laneID']) or !isset($output['columnID']) or !isset($lanes)) $this->kanban->updateLane($executionID, 'task');
|
||||
return $mails;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user