Use active project filter as default field value when creating new tasks
Summary: See T389. If you're looking at tasks in project X, default new tasks into project X. Test Plan: - Created a new task without associated projects. - Created a new task from a filter view with 1 and 2 projects; defaults were filled in. - Submitted task with invalid title, projects were correctly preserved. Reviewed By: skrul Reviewers: skrul, hunterbridges, jungejason, tuomaspelkonen, aran CC: aran, skrul, epriestley Differential Revision: 757
This commit is contained in:
@@ -47,6 +47,11 @@ class ManiphestTaskEditController extends ManiphestController {
|
||||
// These allow task creation with defaults.
|
||||
if (!$request->isFormPost()) {
|
||||
$task->setTitle($request->getStr('title'));
|
||||
|
||||
$default_projects = $request->getStr('projects');
|
||||
if ($default_projects) {
|
||||
$task->setProjectPHIDs(explode(';', $default_projects));
|
||||
}
|
||||
}
|
||||
|
||||
$file_phids = $request->getArr('files', array());
|
||||
|
||||
Reference in New Issue
Block a user