From 81f3131bbc4eaabf8f7e2d8825e0ba45a5e1b507 Mon Sep 17 00:00:00 2001 From: mluepkes Date: Mon, 12 Jan 2015 00:11:48 +0100 Subject: Implemented Project duplication with Tasks within Controller\Project --- app/Controller/Project.php | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'app') diff --git a/app/Controller/Project.php b/app/Controller/Project.php index d0da53d0..2aa4ac74 100644 --- a/app/Controller/Project.php +++ b/app/Controller/Project.php @@ -307,7 +307,14 @@ class Project extends Base $this->checkCSRFParam(); - if ($this->project->duplicate($project['id'])) { + $clone_project_id = $this->project->duplicate($project['id']); + + if ($clone_project_id) { + // Find all task for source project and clone to target project + $tasks = $this->taskFinder->getAll($project['id']); + foreach($tasks as $task) { + $this->taskDuplication->duplicateToProject($task['id'], $clone_project_id); + } $this->session->flash(t('Project cloned successfully.')); } else { $this->session->flashError(t('Unable to clone this project.')); -- cgit v1.2.3 From 569c99a73302271b80cd7c8a25356ea285606563 Mon Sep 17 00:00:00 2001 From: Michael Lüpkes Date: Tue, 13 Jan 2015 14:09:02 +0100 Subject: set maxlength for name input fields in templates --- app/Template/board/edit.php | 4 ++-- app/Template/category/edit.php | 2 +- app/Template/category/index.php | 2 +- app/Template/project/edit.php | 2 +- app/Template/project/new.php | 2 +- app/Template/subtask/create.php | 2 +- app/Template/subtask/edit.php | 2 +- app/Template/swimlane/edit.php | 2 +- app/Template/swimlane/index.php | 4 ++-- app/Template/task/edit.php | 2 +- app/Template/task/new.php | 2 +- app/Template/user/edit.php | 2 +- app/Template/user/new.php | 2 +- 13 files changed, 15 insertions(+), 15 deletions(-) (limited to 'app') diff --git a/app/Template/board/edit.php b/app/Template/board/edit.php index 65a8fb26..f30a65c1 100644 --- a/app/Template/board/edit.php +++ b/app/Template/board/edit.php @@ -17,7 +17,7 @@ formLabel('#'.++$i, 'title['.$column['id'].']', array('title="column_id='.$column['id'].'"')) ?> - formText('title['.$column['id'].']', $values, $errors, array('required')) ?> + formText('title['.$column['id'].']', $values, $errors, array('required', 'maxlength="50"')) ?> formNumber('task_limit['.$column['id'].']', $values, $errors, array('placeholder="'.t('limit').'"')) ?>