Page MenuHomePhabricator

Custom filter condition "Show Tasks Not Blocked By Other Tasks" does not show tasks whose blocked tasks are all completed
Closed, ResolvedPublic

Description

(Report as requested by @epriestley on IRC)

I have a workboard which contains three open tasks:

  • T1 has no tasks listed under "Blocked By";
  • T2 has an open task listed under "Blocked By";
  • T3 has a resolved task listed under "Blocked By".

I select "Custom Filter", and choose "Show Tasks Not Blocked By Other Tasks" from the "Blocked" select box.

The workboard now only shows T1.

I expect the workboard to show T1, because that task cannot be blocked, and I also expect the workboard to show T3, because that task's blocking task has been closed, and hence T3 is no longer blocked from completion.

Event Timeline

mpalmer raised the priority of this task from to Needs Triage.
mpalmer updated the task description. (Show Details)
mpalmer added a project: Maniphest.
mpalmer added subscribers: mpalmer, epriestley.

You mean T3 right? T2 has an open task under Blocked By according to the scenario you stated.

Oh balls. All that care and attention to get the description right, and then I go and make a n00b mistake. Thanks for the catch, @hach-que.

I assume that ApplicationSearch in Maniphest also gets this wrong?

@chad, yes, I've just confirmed that the maniphest "Advanced Search" form also behaves in the same manner.

I dug in, and the attached diff is what I came up with. The problem was that by left joining with the IN ('open','inprogress') condition, you're not excluding any rows from the result set, you're just leaving all the values NULL. It's the WHERE that has to be modified, so that the rows don't get end up in the result set. I could have modified the join (to not filter on status) and then change the WHERE to check status IN ('open','inprogress'), but this seemed like the least invasive change.

epriestley added a subscriber: btrahan.

@btrahan, @mpalmer isn't comfortable signing the CLA, and I've looked at D11949. In the interest of propriety, can you fix this without looking at D11949 when you have a chance?