mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-09 14:21:02 +01:00
Allow "Description" and "Assigned To" to be prefilled in Maniphest's create task interface
Summary: Ref T3320. Request from Dropbox. You can currently prefill "title" and some other stuff (including most of the fields by using templates) but there's no way to prefill description and assigned to right now. - Allow "Description" to be prefilled with a string ("description=..."). - Allow "Assigned To" to be prefilled with a user rather than a PHID ("assign=username"). Test Plan: Hit `/maniphest/task/create/?assign=epriestley&description=derpderp&title=blarpblarp` locally and got prefills. {F45259} Reviewers: chad, deuresti Reviewed By: chad CC: aran, euresti Maniphest Tasks: T3320 Differential Revision: https://secure.phabricator.com/D6132
This commit is contained in:
parent
f1bf27959f
commit
3567f1a1df
1 changed files with 12 additions and 0 deletions
|
@ -38,6 +38,18 @@ final class ManiphestTaskEditController extends ManiphestController {
|
|||
if ($default_projects) {
|
||||
$task->setProjectPHIDs(explode(';', $default_projects));
|
||||
}
|
||||
|
||||
$task->setDescription($request->getStr('description'));
|
||||
|
||||
$assign = $request->getStr('assign');
|
||||
if (strlen($assign)) {
|
||||
$assign_user = id(new PhabricatorUser())->loadOneWhere(
|
||||
'username = %s',
|
||||
$assign);
|
||||
if ($assign_user) {
|
||||
$task->setOwnerPHID($assign_user->getPHID());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$file_phids = $request->getArr('files', array());
|
||||
|
|
Loading…
Reference in a new issue