Enable prefilling of projects and priority fields in Maniphest task creation
Summary: Projects and priority inputs can be prefilled similar to how title and description fields work. Prefilling of projects already worked but used PHIDs instead of more user friendly name so I changed that too. Test Plan: Visit [[/maniphest/task/create/?projects=Maniphest;Easy&priority=100&assign=vrana&title=Hip-hip&description=hooray!|example]] and see prefilled form fields. Reviewers: epriestley, #blessed_reviewers Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7394
This commit is contained in:
@@ -7,6 +7,7 @@ final class PhabricatorProjectQuery
|
||||
private $phids;
|
||||
private $memberPHIDs;
|
||||
private $slugs;
|
||||
private $names;
|
||||
|
||||
private $status = 'status-any';
|
||||
const STATUS_ANY = 'status-any';
|
||||
@@ -43,6 +44,11 @@ final class PhabricatorProjectQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withNames(array $names) {
|
||||
$this->names = $names;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function needMembers($need_members) {
|
||||
$this->needMembers = $need_members;
|
||||
return $this;
|
||||
@@ -224,6 +230,13 @@ final class PhabricatorProjectQuery
|
||||
$this->slugs);
|
||||
}
|
||||
|
||||
if ($this->names) {
|
||||
$where[] = qsprintf(
|
||||
$conn_r,
|
||||
'name IN (%Ls)',
|
||||
$this->names);
|
||||
}
|
||||
|
||||
$where[] = $this->buildPagingClause($conn_r);
|
||||
|
||||
return $this->formatWhereClause($where);
|
||||
|
||||
Reference in New Issue
Block a user