mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-20 12:30:56 +01:00
Exclude closed tasks from blocked/blocking filter
Summary: Fixes T7392. When filtering blocked/blocking Maniphest tasks, don't consider closed tasks. Test Plan: # Created `T1` and `T2` with `T2 depends on T1`. # Marked `T1` as resolved. # Searched for tasks "blocked by other tasks" and noted that `T2` wasn't in the result set. Reviewers: btrahan, #blessed_reviewers, epriestley Reviewed By: #blessed_reviewers, epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7392 Differential Revision: https://secure.phabricator.com/D11911
This commit is contained in:
parent
0a8eee37a1
commit
130aa755bb
1 changed files with 12 additions and 4 deletions
|
@ -791,17 +791,25 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery {
|
|||
$joins[] = qsprintf(
|
||||
$conn_r,
|
||||
'LEFT JOIN %T blocking ON blocking.src = task.phid '.
|
||||
'AND blocking.type = %d',
|
||||
'AND blocking.type = %d '.
|
||||
'JOIN %T blockingtask ON blocking.dst = blockingtask.phid '.
|
||||
'AND blockingtask.status IN (%Ls)',
|
||||
$edge_table,
|
||||
ManiphestTaskDependedOnByTaskEdgeType::EDGECONST);
|
||||
ManiphestTaskDependedOnByTaskEdgeType::EDGECONST,
|
||||
id(new ManiphestTask())->getTableName(),
|
||||
ManiphestTaskStatus::getOpenStatusConstants());
|
||||
}
|
||||
if ($this->shouldJoinBlockedTasks()) {
|
||||
$joins[] = qsprintf(
|
||||
$conn_r,
|
||||
'LEFT JOIN %T blocked ON blocked.src = task.phid '.
|
||||
'AND blocked.type = %d',
|
||||
'AND blocked.type = %d '.
|
||||
'JOIN %T blockedtask ON blocked.dst = blockedtask.phid '.
|
||||
'AND blockedtask.status IN (%Ls)',
|
||||
$edge_table,
|
||||
ManiphestTaskDependsOnTaskEdgeType::EDGECONST);
|
||||
ManiphestTaskDependsOnTaskEdgeType::EDGECONST,
|
||||
id(new ManiphestTask())->getTableName(),
|
||||
ManiphestTaskStatus::getOpenStatusConstants());
|
||||
}
|
||||
|
||||
if ($this->anyProjectPHIDs || $this->anyUserProjectPHIDs) {
|
||||
|
|
Loading…
Reference in a new issue