HomePhabricator

Maniphest - fix blocking / blocked task queries

Description

Maniphest - fix blocking / blocked task queries

Summary: Fixes T7392. I kind of stink at SQL so my approach here was to "start over" conceptually and this way makes the most sense to me - we basically do one join on the dependency table and then a second join back from the dependency table to the main task table. In the where clause we filter the resulting rows, first checking the data from dependency join for existence as appropros and then checking the second join for main task table for the proper "open" task values.

Test Plan: made a task X be blocked by task Y. closed task y. search for "not blocked" tasks and saw task X.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7392

Differential Revision: https://secure.phabricator.com/D11962