Implemented Changes to Project Duplication to include Swimlanes and Tasks.

ProjectDuplication::duplicate accepts additional param of type array now. Array includes which optional parts to duplicate. Optional parts are: 'swimlane', 'category', 'task', 'action'.
This commit is contained in:
Michael Lüpkes
2015-02-03 11:16:10 +01:00
parent 24300f828a
commit e5ea361255
8 changed files with 218 additions and 16 deletions

View File

@@ -297,7 +297,7 @@ class Project extends Base
/**
* Duplicate a project
*
* @author Antonio Rabelo
* @author Antonio Rabelo & Michael Lüpkes
* @access public
*/
public function duplicate()
@@ -305,10 +305,8 @@ class Project extends Base
$project = $this->getProject();
if ($this->request->getStringParam('duplicate') === 'yes') {
$this->checkCSRFParam();
if ($this->projectDuplication->duplicate($project['id'])) {
$values = array_keys($this->request->getValues());
if ($this->projectDuplication->duplicate($project['id'], $values)) {
$this->session->flash(t('Project cloned successfully.'));
} else {
$this->session->flashError(t('Unable to clone this project.'));