Page MenuHomePhabricator

D11962.diff
No OneTemporary

D11962.diff

diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php
--- a/src/applications/maniphest/query/ManiphestTaskQuery.php
+++ b/src/applications/maniphest/query/ManiphestTaskQuery.php
@@ -588,21 +588,25 @@
if ($this->blockingTasks === true) {
$parts[] = qsprintf(
$conn,
- 'blocking.dst IS NOT NULL');
+ 'blocking.dst IS NOT NULL AND blockingtask.status IN (%Ls)',
+ ManiphestTaskStatus::getOpenStatusConstants());
} else if ($this->blockingTasks === false) {
$parts[] = qsprintf(
$conn,
- 'blocking.dst IS NULL');
+ 'blocking.dst IS NULL OR blockingtask.status NOT IN (%Ls)',
+ ManiphestTaskStatus::getOpenStatusConstants());
}
if ($this->blockedTasks === true) {
$parts[] = qsprintf(
$conn,
- 'blocked.dst IS NOT NULL');
+ 'blocked.dst IS NOT NULL AND blockedtask.status IN (%Ls)',
+ ManiphestTaskStatus::getOpenStatusConstants());
} else if ($this->blockedTasks === false) {
$parts[] = qsprintf(
$conn,
- 'blocked.dst IS NULL');
+ 'blocked.dst IS NULL OR blockedtask.status NOT IN (%Ls)',
+ ManiphestTaskStatus::getOpenStatusConstants());
}
return '('.implode(') OR (', $parts).')';
@@ -792,24 +796,20 @@
$conn_r,
'LEFT JOIN %T blocking ON blocking.src = task.phid '.
'AND blocking.type = %d '.
- 'LEFT JOIN %T blockingtask ON blocking.dst = blockingtask.phid '.
- 'AND blockingtask.status IN (%Ls)',
+ 'LEFT JOIN %T blockingtask ON blocking.dst = blockingtask.phid',
$edge_table,
ManiphestTaskDependedOnByTaskEdgeType::EDGECONST,
- id(new ManiphestTask())->getTableName(),
- ManiphestTaskStatus::getOpenStatusConstants());
+ id(new ManiphestTask())->getTableName());
}
if ($this->shouldJoinBlockedTasks()) {
$joins[] = qsprintf(
$conn_r,
'LEFT JOIN %T blocked ON blocked.src = task.phid '.
'AND blocked.type = %d '.
- 'LEFT JOIN %T blockedtask ON blocked.dst = blockedtask.phid '.
- 'AND blockedtask.status IN (%Ls)',
+ 'LEFT JOIN %T blockedtask ON blocked.dst = blockedtask.phid',
$edge_table,
ManiphestTaskDependsOnTaskEdgeType::EDGECONST,
- id(new ManiphestTask())->getTableName(),
- ManiphestTaskStatus::getOpenStatusConstants());
+ id(new ManiphestTask())->getTableName());
}
if ($this->anyProjectPHIDs || $this->anyUserProjectPHIDs) {

File Metadata

Mime Type
text/plain
Expires
Tue, Nov 12, 12:53 AM (1 w, 1 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6736277
Default Alt Text
D11962.diff (2 KB)

Event Timeline