1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-15 19:32:40 +01:00
phorge-phorge/src/applications/search/buckets/PhabricatorSearchResultBucket.php
epriestley 42d49be47b Change Differential revision buckets to focus on "next required action"
Summary:
Ref T10939. Ref T4144. This splits the existing buckets ("Blocking Others", "Action Required", "Waiting on Others") into 6-7 buckets with a stronger focus on what the next action you need to take is.

See T10939#175423 for some discussion.

Overall, I think some of the root problems here are caused by reviewer laziness and shotgun review workflows (where a ton of people get automatically added to everything, probably unnecessarily), but these buckets haven't been updated since the introduction of blocking reviewers or project/package reviewers and I think splitting the 3 buckets into 6 buckets isn't unreasonable, even though it's kind of a lot of buckets and the root problem here is approximately "I want to ignore a bunch of stuff on my dashboard".

I didn't remove the old bucketing code yet since it's still in use on the default homepage.

This also isn't quite right until I fix the tokenizer to work properly, since it won't bucket project/package reviewers accurately.

Test Plan: {F1395972}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T4144, T10939

Differential Revision: https://secure.phabricator.com/D15924
2016-05-16 10:45:20 -07:00

54 lines
1.1 KiB
PHP

<?php
abstract class PhabricatorSearchResultBucket
extends Phobject {
private $viewer;
private $pageSize;
final public function setPageSize($page_size) {
$this->pageSize = $page_size;
return $this;
}
final public function getPageSize() {
if ($this->pageSize === null) {
return $this->getDefaultPageSize();
}
return $this->pageSize;
}
public function setViewer(PhabricatorUser $viewer) {
$this->viewer = $viewer;
return $this;
}
public function getViewer() {
return $this->viewer;
}
protected function getDefaultPageSize() {
return 1000;
}
abstract public function getResultBucketName();
abstract protected function buildResultGroups(
PhabricatorSavedQuery $query,
array $objects);
final public function newResultGroups(
PhabricatorSavedQuery $query,
array $objects) {
return $this->buildResultGroups($query, $objects);
}
final public function getResultBucketKey() {
return $this->getPhobjectClassConstant('BUCKETKEY');
}
final protected function newGroup() {
return new PhabricatorSearchResultBucketGroup();
}
}