From a76049abd401d13378144100ba5aeedcb9ff6fbb Mon Sep 17 00:00:00 2001 From: epriestley Date: Mon, 2 Mar 2015 17:00:20 -0800 Subject: [PATCH] Fix not blocking / not blocked queries Summary: Fixes T7434. We need to LEFT JOIN, not JOIN here, because we still want result rows where the value is `null`. Test Plan: Issued blocked/not-blocked + blocking/not-blocking queries, got results in all cases. Reviewers: btrahan Reviewed By: btrahan Subscribers: epriestley Maniphest Tasks: T7434 Differential Revision: https://secure.phabricator.com/D11939 --- src/applications/maniphest/query/ManiphestTaskQuery.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/applications/maniphest/query/ManiphestTaskQuery.php b/src/applications/maniphest/query/ManiphestTaskQuery.php index a00331cf83..9ff352cd3b 100644 --- a/src/applications/maniphest/query/ManiphestTaskQuery.php +++ b/src/applications/maniphest/query/ManiphestTaskQuery.php @@ -792,7 +792,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { $conn_r, 'LEFT JOIN %T blocking ON blocking.src = task.phid '. 'AND blocking.type = %d '. - 'JOIN %T blockingtask ON blocking.dst = blockingtask.phid '. + 'LEFT JOIN %T blockingtask ON blocking.dst = blockingtask.phid '. 'AND blockingtask.status IN (%Ls)', $edge_table, ManiphestTaskDependedOnByTaskEdgeType::EDGECONST, @@ -804,7 +804,7 @@ final class ManiphestTaskQuery extends PhabricatorCursorPagedPolicyAwareQuery { $conn_r, 'LEFT JOIN %T blocked ON blocked.src = task.phid '. 'AND blocked.type = %d '. - 'JOIN %T blockedtask ON blocked.dst = blockedtask.phid '. + 'LEFT JOIN %T blockedtask ON blocked.dst = blockedtask.phid '. 'AND blockedtask.status IN (%Ls)', $edge_table, ManiphestTaskDependsOnTaskEdgeType::EDGECONST,