* Add selected lane when batch create story in kanban.
This commit is contained in:
@@ -2269,11 +2269,12 @@ class executionModel extends model
|
||||
* @param array $stories
|
||||
* @param array $products
|
||||
* @param string $extra
|
||||
* @param array $lanes
|
||||
*
|
||||
* @access public
|
||||
* @return bool
|
||||
*/
|
||||
public function linkStory($executionID, $stories = array(), $products = array(), $extra = '')
|
||||
public function linkStory($executionID, $stories = array(), $products = array(), $extra = '', $lanes = array())
|
||||
{
|
||||
if(empty($executionID)) return false;
|
||||
if(empty($stories)) $stories = $this->post->stories;
|
||||
@@ -2296,7 +2297,17 @@ class executionModel extends model
|
||||
if(strpos($notAllowedStatus, $storyList[$storyID]->status) !== false) continue;
|
||||
if(isset($linkedStories[$storyID])) continue;
|
||||
|
||||
if(isset($output['laneID']) and isset($output['columnID'])) $this->kanban->addKanbanCell($executionID, $output['laneID'], $output['columnID'], 'story', $storyID);
|
||||
$columnID = isset($output['columnID']) ? $output['columnID'] : 0;
|
||||
$laneID = isset($output['laneID']) ? $output['laneID'] : 0;
|
||||
if(isset($lanes[$storyID])) $laneID = $lanes[$storyID];
|
||||
|
||||
if(!empty($laneID))
|
||||
{
|
||||
$columnIDByLaneID = $this->kanban->getColumnIDByLaneID($laneID, 'backlog');
|
||||
$columnID = empty($columnIDByLaneID) ? $columnID : $columnIDByLaneID;
|
||||
}
|
||||
|
||||
if(!empty($laneID) and !empty($columnID)) $this->kanban->addKanbanCell($executionID, $laneID, $columnID, 'story', $storyID);
|
||||
|
||||
$data = new stdclass();
|
||||
$data->project = $executionID;
|
||||
|
||||
Reference in New Issue
Block a user