Page MenuHomePhabricator

(WIP) Initial work on task search on column, not finished yet
AbandonedPublic

Authored by bluehawk on Jun 17 2014, 10:39 PM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Mar 26, 3:53 AM
Unknown Object (File)
Tue, Mar 5, 10:30 AM
Unknown Object (File)
Feb 4 2024, 4:09 AM
Unknown Object (File)
Dec 22 2023, 7:49 PM
Unknown Object (File)
Dec 12 2023, 10:57 PM
Unknown Object (File)
Nov 26 2023, 1:46 AM
Unknown Object (File)
Nov 23 2023, 11:54 AM
Unknown Object (File)
Nov 13 2023, 8:08 PM

Details

Reviewers
None
Group Reviewers
Blessed Reviewers
Summary

Adding ability to search tasks based on a column of a work board.

Test Plan

Search for tasks based on column (not working yet)

Diff Detail

Repository
rP Phabricator
Branch
search-tasks-on-column
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 1222
Build 1222: [Placeholder Plan] Wait for 30 Seconds

Event Timeline

bluehawk retitled this revision from to (WIP) Initial work on task search on column, not finished yet.
bluehawk updated this object.
bluehawk edited the test plan for this revision. (Show Details)

Preview:

undefined (318×524 px, 26 KB)

undefined (51×592 px, 4 KB)

Couple questions:

  1. How do I get hint text to show up in my fields like the other type-aheads? e.g. "Type a column or project name..."
  2. Phabricator Queries are magic that is beyond my wizardry. See inline comments.
  3. Also, I can't get the things I enter into my new fields to be preserved when I reload the page.
src/applications/maniphest/query/ManiphestTaskQuery.php
551

This doesn't work, and I have no idea how to ask for if an edge exists in the phabricator_maniphest.edge table with a type of 43 and references this task.

554–558

And this is just copy paste fail.

How do I get hint text to show up in my fields like the other type-aheads? e.g. "Type a column or project name..."

These are "/projectsorusers/" style endpoints, see inline.

src/applications/maniphest/query/ManiphestTaskQuery.php
686

Add a JOIN to the edge table here, e.g. JOIN edge column ON edge.src = task.phid AND edge.type = 43

src/applications/maniphest/query/ManiphestTaskSearchEngine.php
265–266

I think things aren't sticking because these are Phids but should be PHIDs.

src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
77–81

e.g., this is "type a user, project or package name".

bluehawk edited edge metadata.
  • Fixing join, fixing columns not sticking due to "Phids" "PHIDs" typo, adding "Type a column or project name"
  • Moving the "(on board Something)" into displayname, rather than the typeahead.

Got the join working, though had some fun where "column" can't be used, I think because it has special meaning in SQL. Also you were right about the Phid/PHID error.

I have "Any column" searching working, but am still working on "all columns". I think that I need to do something similar to how the project query does an intersection and counts the projectCount. Does that sound right?

src/applications/project/storage/PhabricatorProjectColumn.php
54–63

I modified the PhabricatorProjectColumn->getDisplayName() to show "ColumnName (on board Board)" so that it showed up correctly in the tokenizer. Otherwise, it's impossible to tell which board the 20 "Backlog"s are coming from. However, now that shows up everywhere else and is horribly ugly. I'm not sure how to make it show up that way only in the tokenizer.

Ugliness:

undefined (24×284 px, 2 KB)

undefined (132×948 px, 16 KB)

Without this change, this is what you get when searching:

undefined (130×379 px, 8 KB)

src/view/form/control/AphrontFormTokenizerControl.php
95

I added a type hint, because it looked strange to have this one be empty when most the other fields had one. Should I change that?

{F168174}

Without the type hint:

{F168178}

Additionally, because I've made it so the type hinting works on the column OR the project name, I think it's beneficial to inform the user that they can type either.

I think that I need to do something similar to how the project query does an intersection and counts the projectCount. Does that sound right?

I think this is the cleanest way to implement it, yes. I suppose you can also JOIN the table a bunch of times, one for each project, but I would guess that would end up more gross and/or less performant.

src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
412

There's no great way to fix the name thing in general. You can hard-code whatever you want here, which will fix the typeahead dropdown menu. However, it won't affect tokens that are pre-filled into the input on page load, since those will use the names of their handles. There's no reasonable way to avoid this right now. You could go find that code (AphrontTokenizerTemplateView) and do something hacky there, maybe (in render(), where renderToken() is called).

(9/25/2014 9:38:54 AM) epriestley: Note that we no longer plan to provide D9611 or the requested titular feature of T5024, per se, in the upstream.