Page MenuHomePhabricator

Check for presence of any Columns before triggering initialization of Workboard
ClosedPublic

Authored by chad on Oct 7 2014, 6:44 PM.
Tags
None
Referenced Files
Unknown Object (File)
Thu, Dec 5, 11:09 PM
Unknown Object (File)
Wed, Dec 4, 5:52 AM
Unknown Object (File)
Mon, Nov 25, 6:33 AM
Unknown Object (File)
Nov 19 2024, 6:04 AM
Unknown Object (File)
Nov 13 2024, 7:05 PM
Unknown Object (File)
Oct 5 2024, 10:35 AM
Unknown Object (File)
Oct 1 2024, 8:47 AM
Unknown Object (File)
Sep 1 2024, 6:07 AM
Subscribers

Details

Summary

Ref T6256, this prevents more installs from getting in this weird state. We'll have to follow up if possible to "fix" the issue retroactively.

Test Plan

Test moving a backlog column to new position, hiding rest of other panels.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

chad retitled this revision from to Check for presence of any Columns before triggering initialization of Workboard.
chad updated this object.
chad edited the test plan for this revision. (Show Details)
chad added reviewers: epriestley, btrahan.
epriestley edited edge metadata.

Minor nit: when $var is known to be declared, !$var is equivalent to empty($var) and preferred. That is, prefer if (!$columns) over if (empty($columns)) (when $columns certainly is known to be declared) by convention.

src/applications/project/controller/PhabricatorProjectBoardViewController.php
71–74

I think we'll still incorrectly enter this block if there are columns but they're all hidden? It's not currently possible to hide every column (since backlog columns can not be hidden), but it might be in the future (if we let you hide the backlog column).

The logic ideally should go like:

if (!$columns) {
  // Run the query again, without any status constraints, to make sure there really are absolutely no columns.
  if ($really_no_columns) {
    // do initialize stuff
  } else {
    // show some "all columns are hidden" state
  }
}

Since you can't actually break this for now, this fix moves us forward as-is, but maybe TODO this or whatever.

This revision is now accepted and ready to land.Oct 7 2014, 7:19 PM

I thought the same, but we don't allow Backlog to be hidden. We may in the future?

Oh haha, I fully read your comment now. I can TODO-ify it.

This revision was automatically updated to reflect the committed changes.