Page MenuHomePhabricator

Add project tags to workboard cards

Authored by chad on Jan 3 2016, 11:12 AM.
Referenced Files
Unknown Object (File)
Mon, Nov 21, 10:22 AM
Unknown Object (File)
Sat, Nov 19, 7:27 AM
Unknown Object (File)
Wed, Nov 16, 2:16 PM
Unknown Object (File)
Wed, Nov 16, 8:30 AM
Unknown Object (File)
Sat, Nov 12, 11:01 PM
Unknown Object (File)
Sat, Nov 12, 1:29 AM
Unknown Object (File)
Fri, Nov 11, 9:04 PM
Unknown Object (File)
Fri, Nov 11, 3:32 PM
"Like" token, awarded by avivey."Like" token, awarded by Luke081515.2."Like" token, awarded by joshuaspence."Like" token, awarded by johnny-bit.



Ref T4863. Add project tags to workboard cards.

Test Plan

Test Board.png (227×378 px, 22 KB)

Diff Detail

rP Phabricator
Lint Not Applicable
Tests Not Applicable

Event Timeline

joshuaspence retitled this revision from to Add project tags to workboard cards.
joshuaspence updated this object.
joshuaspence edited the test plan for this revision. (Show Details)
joshuaspence added reviewers: epriestley, chad.
epriestley edited edge metadata.

This is inefficient because it does fetches per-card. If you load a board with a large number of cards that have projects, I expect you'll see roughly one query per unique project.

The simplest fix is probably to let PHUIHandleTagListView take a PhabricatorHandleList instead of only array $handles (it's generally sufficient to just remove the array typehint).

You can't unset() a handle list, so the new logic would look like:

$project_phids = array_fuse($task->getProjectPHIDs());

$handle_list = $viewer->loadHandles($project_phids);

That should bulk-fetch all the handles at render time in a single query.


Specifically, this will issue a query.

This revision now requires changes to proceed.Jan 9 2016, 7:52 PM
chad edited reviewers, added: joshuaspence; removed: chad.
chad edited edge metadata.
  • Updates per comments.

I have this roughly working, but get a 500 whenever I edit a task. I think I need to attach Projects somewhere, but can't trace the query.

6	phabricator	applications/maniphest/storage/ManiphestTask.php : 157	PhabricatorLiskDAO::assertAttached()
5	phabricator	applications/project/view/ProjectBoardTaskCard.php : 86	ManiphestTask::getProjectPHIDs()
4	phabricator	applications/project/controller/PhabricatorProjectMoveController.php : 158	ProjectBoardTaskCard::getItem()
3	phabricator	aphront/configuration/AphrontApplicationConfiguration.php : 237	PhabricatorProjectMoveController::handleRequest()
2	phabricator	aphront/configuration/AphrontApplicationConfiguration.php : 149	AphrontApplicationConfiguration::processRequest()
1		/Users/familyroom/Sites/phabricator/webroot/index.php : 17	AphrontApplicationConfiguration::runHTTPRequest()
chad edited edge metadata.
  • fix reorder column fatal
  • Editing still fatals

Ok, I think this requires slight modification to EditEngine and not positive how to proceed. But I annotated the issue.


could this go up a level to AphrontTagView?


I think the fix is just:


Basically, we can sort of cheat here since we have the $column, and each $column is associated with a project, so we can figure out which project the user must be looking at by figuring out which project the column belongs to.


Yeah, I think that's reasonable.

chad marked 2 inline comments as done.
  • ccchanges
epriestley edited edge metadata.
This revision is now accepted and ready to land.Jan 31 2016, 9:33 PM

This change seemed correct to me, but unclear why ObjectQuery was used to begin with?


The code currently tries to be generic when possible to make possibly putting other types of objects (mocks, events, whatever) on workboards some day easier, but it's fine to just hard-code this to tasks for now.

This revision was automatically updated to reflect the committed changes.

ah I see. welp, want to roll the server and see how bad this looks?

Surprisingly not terrible and somewhat useful with bugs and features. "Personal" projects (companies) might get old though.