diff options
author | Fabiano Pereira <fabiano.pereira@serpro.gov.br> | 2015-09-03 16:27:28 -0300 |
---|---|---|
committer | Fabiano Pereira <fabiano.pereira@serpro.gov.br> | 2015-09-04 10:17:20 -0300 |
commit | 339c990577a0c6fa8fd99959fe52aa25eff59c8f (patch) | |
tree | 1fd5c720fb8a142a6fbaafea1c26b145773a8d67 /app/Api/Swimlane.php | |
parent | de91d5820b9f987b17bea245ecf999b8e6aa7a81 (diff) |
#1144 Add description field to swimlane.
Diffstat (limited to 'app/Api/Swimlane.php')
-rw-r--r-- | app/Api/Swimlane.php | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/app/Api/Swimlane.php b/app/Api/Swimlane.php index fb40841f..13838d77 100644 --- a/app/Api/Swimlane.php +++ b/app/Api/Swimlane.php @@ -40,14 +40,18 @@ class Swimlane extends \Core\Base return $this->swimlane->getDefault($project_id); } - public function addSwimlane($project_id, $name) + public function addSwimlane($project_id, $name, $description = '') { - return $this->swimlane->create($project_id, $name); + return $this->swimlane->create(array('project_id' => $project_id, 'name' => $name, 'description' => $description)); } - public function updateSwimlane($swimlane_id, $name) + public function updateSwimlane($swimlane_id, $name, $description = null) { - return $this->swimlane->rename($swimlane_id, $name); + $values = array('id' => $swimlane_id, 'name' => $name); + if (!is_null($description)) { + $values['description'] = $description; + } + return $this->swimlane->update($values); } public function removeSwimlane($project_id, $swimlane_id) |