forgot to update this with new application search.
Details
- Reviewers
epriestley - Maniphest Tasks
- T4933: "View Commits" profile action is linked to old audit
- Commits
- Restricted Diffusion Commit
rP97f88f468b31: Audit - fix profile link
verified "View Commits" took me to my commits and the commits of another user from respective profile pages.
Diff Detail
- Repository
- rP Phabricator
- Branch
- commitlink
- Lint
Lint Passed - Unit
No Test Coverage - Build Status
Buildable 197 Build 197: [Placeholder Plan] Wait for 30 Seconds
Event Timeline
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".
WMF also has some issue with their markup where [] is unreasonably difficult to type in URIs:
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'. |
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...)