Do not set default task assignee for team projects
This commit is contained in:
@@ -3,6 +3,7 @@ Version 1.0.39 (unreleased)
|
|||||||
|
|
||||||
Improvements:
|
Improvements:
|
||||||
|
|
||||||
|
* Do not set default task assignee for team projects
|
||||||
* Comments are highlighted if hash (#comment-123) is present in URL
|
* Comments are highlighted if hash (#comment-123) is present in URL
|
||||||
* Documentation translated in Turkish
|
* Documentation translated in Turkish
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ class TaskBulkController extends BaseController
|
|||||||
'project' => $project,
|
'project' => $project,
|
||||||
'values' => $values,
|
'values' => $values,
|
||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, $project['is_private']),
|
'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, $project['is_private'] == 1),
|
||||||
'colors_list' => $this->colorModel->getList(),
|
'colors_list' => $this->colorModel->getList(),
|
||||||
'categories_list' => $this->categoryModel->getList($project['id']),
|
'categories_list' => $this->categoryModel->getList($project['id']),
|
||||||
)));
|
)));
|
||||||
|
|||||||
@@ -23,8 +23,8 @@ class TaskCreationController extends BaseController
|
|||||||
public function show(array $values = array(), array $errors = array())
|
public function show(array $values = array(), array $errors = array())
|
||||||
{
|
{
|
||||||
$project = $this->getProject();
|
$project = $this->getProject();
|
||||||
$swimlanes_list = $this->swimlaneModel->getList($project['id'], false, true);
|
$swimlanesList = $this->swimlaneModel->getList($project['id'], false, true);
|
||||||
$values += $this->prepareValues($swimlanes_list);
|
$values += $this->prepareValues($project['is_private'], $swimlanesList);
|
||||||
|
|
||||||
$values = $this->hook->merge('controller:task:form:default', $values, array('default_values' => $values));
|
$values = $this->hook->merge('controller:task:form:default', $values, array('default_values' => $values));
|
||||||
$values = $this->hook->merge('controller:task-creation:form:default', $values, array('default_values' => $values));
|
$values = $this->hook->merge('controller:task-creation:form:default', $values, array('default_values' => $values));
|
||||||
@@ -34,9 +34,9 @@ class TaskCreationController extends BaseController
|
|||||||
'errors' => $errors,
|
'errors' => $errors,
|
||||||
'values' => $values + array('project_id' => $project['id']),
|
'values' => $values + array('project_id' => $project['id']),
|
||||||
'columns_list' => $this->columnModel->getList($project['id']),
|
'columns_list' => $this->columnModel->getList($project['id']),
|
||||||
'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, $project['is_private']),
|
'users_list' => $this->projectUserRoleModel->getAssignableUsersList($project['id'], true, false, $project['is_private'] == 1),
|
||||||
'categories_list' => $this->categoryModel->getList($project['id']),
|
'categories_list' => $this->categoryModel->getList($project['id']),
|
||||||
'swimlanes_list' => $swimlanes_list,
|
'swimlanes_list' => $swimlanesList,
|
||||||
)));
|
)));
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,18 +113,22 @@ class TaskCreationController extends BaseController
|
|||||||
* Prepare form values
|
* Prepare form values
|
||||||
*
|
*
|
||||||
* @access protected
|
* @access protected
|
||||||
* @param array $swimlanes_list
|
* @param bool $isPrivateProject
|
||||||
|
* @param array $swimlanesList
|
||||||
* @return array
|
* @return array
|
||||||
*/
|
*/
|
||||||
protected function prepareValues(array $swimlanes_list)
|
protected function prepareValues($isPrivateProject, array $swimlanesList)
|
||||||
{
|
{
|
||||||
$values = array(
|
$values = array(
|
||||||
'swimlane_id' => $this->request->getIntegerParam('swimlane_id', key($swimlanes_list)),
|
'swimlane_id' => $this->request->getIntegerParam('swimlane_id', key($swimlanesList)),
|
||||||
'column_id' => $this->request->getIntegerParam('column_id'),
|
'column_id' => $this->request->getIntegerParam('column_id'),
|
||||||
'color_id' => $this->colorModel->getDefaultColor(),
|
'color_id' => $this->colorModel->getDefaultColor(),
|
||||||
'owner_id' => $this->userSession->getId(),
|
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($isPrivateProject) {
|
||||||
|
$values['owner_id'] = $this->userSession->getId();
|
||||||
|
}
|
||||||
|
|
||||||
return $values;
|
return $values;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user