Page MenuHomePhabricator

Audit - fix profile link
ClosedPublic

Authored by btrahan on May 2 2014, 3:31 PM.
Tags
None
Referenced Files
Unknown Object (File)
Mon, Sep 2, 4:29 PM
Unknown Object (File)
Sat, Aug 31, 8:38 PM
Unknown Object (File)
Sat, Aug 31, 4:50 PM
Unknown Object (File)
Sat, Aug 31, 12:39 PM
Unknown Object (File)
Sun, Aug 25, 7:54 PM
Unknown Object (File)
Sat, Aug 24, 11:06 AM
Unknown Object (File)
Sun, Aug 18, 10:17 PM
Unknown Object (File)
Sun, Aug 18, 6:02 AM
Subscribers

Details

Summary

forgot to update this with new application search.

Test Plan

verified "View Commits" took me to my commits and the commits of another user from respective profile pages.

Diff Detail

Repository
rP Phabricator
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

btrahan retitled this revision from to Audit - fix profile link.
btrahan updated this object.
btrahan edited the test plan for this revision. (Show Details)
btrahan added a reviewer: epriestley.
epriestley edited edge metadata.
This revision is now accepted and ready to land.May 2 2014, 3:43 PM
src/applications/audit/events/AuditActionMenuEventListener.php
39

Oh, this should be unnecessary I think. Or we need to swap a thing in the SearchEngine. If it is necessary, I'll counter-diff you.

src/applications/audit/events/AuditActionMenuEventListener.php
39

it works without this; I was copying Differential basically because WITHOUT this you get the URI as written in the code and WITH it you get a "pretty" query URI.

I think the cleanest fix is:

  • in the Engine, call the parameter authors instead of commitAuthorPHIDs;
  • pass the readable form here: '/audit/?authors='.$user->getUsername()

This is clean and hints to users that they can construct their own similar query in a sensible way (authors=username).

That is, call the HTTP parameter authors. The storage parameter can/should remain commitAuthorPHIDs. For example:

$saved->setParameter(
  'commitAuthorPHIDs',
  $this->readUsersFromRequest($request, 'authors'));

The narrative here is something like "authors is in a human-preferred format, commitAuthorPHIDs is in a normalized computer-preferred format".

btrahan edited edge metadata.

make this all prettier as suggested

WMF also has some issue with their markup where [] is unreasonably difficult to type in URIs:

http://fab.wmflabs.org/T88

This isn't really a problem on our side, but since the authors=epriestley form is better for humans in general we avoid that issue for free.

Cool, looks great.

src/applications/audit/query/PhabricatorCommitSearchEngine.php
91

This probably needs to be 'authors'.

btrahan edited the test plan for this revision. (Show Details)

...even prettier (authors[] => authors)

change commitAuthorPHIDs to authors in form UI

(It worked before this change, but this is more clear. Also maybe there's some caching or something that made it fake-work with my smallish dataset...)

btrahan updated this revision to Diff 21240.

Closed by commit rP97f88f468b31 (authored by @btrahan).