When duplicating a task redirect to the new task
This commit is contained in:
@@ -21,6 +21,7 @@ Core functionalities moved to plugins:
|
|||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
* When duplicating a task redirect to the new task
|
||||||
* Include more shortcut links into the view "My projects"
|
* Include more shortcut links into the view "My projects"
|
||||||
* Duplicate a project with tasks will copy the new tasks in the same columns
|
* Duplicate a project with tasks will copy the new tasks in the same columns
|
||||||
* Offer alternative method to create Mysql and Postgres databases (import sql dump)
|
* Offer alternative method to create Mysql and Postgres databases (import sql dump)
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ class Taskduplication extends Base
|
|||||||
|
|
||||||
if ($task_id > 0) {
|
if ($task_id > 0) {
|
||||||
$this->session->flash(t('Task created successfully.'));
|
$this->session->flash(t('Task created successfully.'));
|
||||||
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task_id)));
|
||||||
} else {
|
} else {
|
||||||
$this->session->flashError(t('Unable to create this task.'));
|
$this->session->flashError(t('Unable to create this task.'));
|
||||||
$this->response->redirect($this->helper->url->to('taskduplication', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
$this->response->redirect($this->helper->url->to('taskduplication', 'duplicate', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
||||||
@@ -83,15 +83,16 @@ class Taskduplication extends Base
|
|||||||
$values = $this->request->getValues();
|
$values = $this->request->getValues();
|
||||||
list($valid,) = $this->taskValidator->validateProjectModification($values);
|
list($valid,) = $this->taskValidator->validateProjectModification($values);
|
||||||
|
|
||||||
if ($valid && $this->taskDuplication->duplicateToProject($task['id'],
|
if ($valid) {
|
||||||
$values['project_id'],
|
$task_id = $this->taskDuplication->duplicateToProject(
|
||||||
$values['swimlane_id'],
|
$task['id'], $values['project_id'], $values['swimlane_id'],
|
||||||
$values['column_id'],
|
$values['column_id'], $values['category_id'], $values['owner_id']
|
||||||
$values['category_id'],
|
);
|
||||||
$values['owner_id'])) {
|
|
||||||
|
|
||||||
$this->session->flash(t('Task created successfully.'));
|
if ($task_id > 0) {
|
||||||
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $task['project_id'], 'task_id' => $task['id'])));
|
$this->session->flash(t('Task created successfully.'));
|
||||||
|
$this->response->redirect($this->helper->url->to('task', 'show', array('project_id' => $values['project_id'], 'task_id' => $task_id)));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->session->flashError(t('Unable to create your task.'));
|
$this->session->flashError(t('Unable to create your task.'));
|
||||||
|
|||||||
Reference in New Issue
Block a user