Don't autoname milestones, but do show the previous milestone name as a hint
Summary: Fixes T10347. In the long run maybe we'll try to guess this better, but for now get rid of the "Milestone X" hardcode and just show what the last one was called. Test Plan: - Created the first milestone for a project. - Created the nth milestone for a project. Reviewers: chad Reviewed By: chad Maniphest Tasks: T10347 Differential Revision: https://secure.phabricator.com/D15262
This commit is contained in:
@@ -20,6 +20,8 @@ final class PhabricatorProjectQuery
|
||||
private $hasSubprojects;
|
||||
private $minDepth;
|
||||
private $maxDepth;
|
||||
private $minMilestoneNumber;
|
||||
private $maxMilestoneNumber;
|
||||
|
||||
private $status = 'status-any';
|
||||
const STATUS_ANY = 'status-any';
|
||||
@@ -111,6 +113,12 @@ final class PhabricatorProjectQuery
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function withMilestoneNumberBetween($min, $max) {
|
||||
$this->minMilestoneNumber = $min;
|
||||
$this->maxMilestoneNumber = $max;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function needMembers($need_members) {
|
||||
$this->needMembers = $need_members;
|
||||
return $this;
|
||||
@@ -494,6 +502,7 @@ final class PhabricatorProjectQuery
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if ($this->hasSubprojects !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
@@ -515,6 +524,20 @@ final class PhabricatorProjectQuery
|
||||
$this->maxDepth);
|
||||
}
|
||||
|
||||
if ($this->minMilestoneNumber !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
'milestoneNumber >= %d',
|
||||
$this->minMilestoneNumber);
|
||||
}
|
||||
|
||||
if ($this->maxMilestoneNumber !== null) {
|
||||
$where[] = qsprintf(
|
||||
$conn,
|
||||
'milestoneNumber <= %d',
|
||||
$this->maxMilestoneNumber);
|
||||
}
|
||||
|
||||
return $where;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user