Page MenuHomePhorge

Add (Advanced) Custom Fields to Item List
ClosedPublic

Authored by avivey on Mar 1 2024, 11:03.
Tags
None
Referenced Files
Unknown Object (File)
Mon, May 20, 18:09
Unknown Object (File)
Mon, May 20, 11:48
Unknown Object (File)
Mon, May 20, 11:13
Unknown Object (File)
Mon, May 20, 06:11
Unknown Object (File)
Mon, May 20, 05:42
Unknown Object (File)
Mon, May 20, 05:27
Unknown Object (File)
Sat, May 18, 17:23
Unknown Object (File)
Thu, May 16, 17:29

Details

Summary

Allow PHP-coded Custom Fields to show things in Lists.

Also add Repository to Revision List and Flags to Maniphest lists.

Closes T15133. Ref T15512, T15750

Test Plan

Look at Repository List and Task lists that have flags.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

avivey held this revision as a draft.
src/applications/maniphest/query/ManiphestTaskSearchEngine.php
396–412

Moving this here is a small improvement, but in reality the "$handles" array used
in this flow is inferior to just using $viewer->renderHandle(), and
should be replace with that.

Before this change, we'd actually load all the labels twice using the old, uncached mechanism.

avivey published this revision for review.Mar 1 2024, 11:39
aklapper subscribed.

IIUC this adds Flags in Differential, Maniphest, etc list views, and adds the repository in Differential list view?

Functionality wise this looks great and works as expected for me:

Screenshot from 2024-04-01 19-27-51.png (970×948 px, 98 KB)

Screenshot from 2024-04-01 19-25-22.png (526×948 px, 107 KB)

Use Results > Export Data > CSV in both Differential and Maniphest query result lists does not include a repository column (that is fine) and is still valid CSV.

Wondering if rendered flags should be links to http://phorge.localhost/flag/ but that would be a separate request anyway.

Giving a +1 on personal capacity; I don't really feel knowledgeable enough to give a +1 as O1 (yet).

(Flags only show up in Maniphest on this one; I'll add them to more apps in a layer diff)

I'm shocked to see the flag on the revisions list. Turns out it's already a thing (on master!). Did not know about it, I'll have to look for it in the code.

Thanks!

Traced the Flags in Revision back to its origin in https://secure.phabricator.com/T1557. I knew about this one - but I was 100% sure that the feature was lost when the SearchEngine classes were introduced.

I see "Unknown object" if the Diff repository is unset. Is that known?

List with no repo.png (191×478 px, 17 KB)

To reproduce, go to a Diff, and manually unset the repo.

src/applications/differential/customfield/DifferentialRepositoryField.php
72

Probably this should be wrapped in if ($this->getValue()) {

  • check for non-null repository in Revision
  • rebase

I see "Unknown object" if the Diff repository is unset. Is that known?

Did not check that one; Updated now.

whatcouldgowrong

P.S.

I cannot reproduce the above arc unit issues, locally.

This revision is now accepted and ready to land.Mon, Apr 29, 06:31
This revision was landed with ongoing or failed builds.Sat, May 11, 10:25
This revision was automatically updated to reflect the committed changes.