1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Update Diff: fix dead-end when not yours

Summary:
Fix "Update Patch" for generic Differential revisions.

You can now help a coworker to update their patch, from the web.

So, if you visit Diff 111 (not yours) and you click "Update Diff", and you paste a valid diff,
you arrive here:

    https://we.phorge.it/differential/diff/222/?revisionID=111

That page as default was suggesting some Diffs that are yours. Plus, now it shows Diff 111.

Omitting the Diff from which the workflow was started made no sense and it's certainly an oversight.

Any follow-up change is welcome to modernize the selector using AphrontFormTokenizerControl.

Closes T15538

Test Plan:
- create a Diff on Differential with user A
- click on Update Diff from user B (pasting a valid diff) and Continue

Now that patch is selected (and selectable). No dead-end anymore.

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: avivey, speck, tobiaswiese, Matthew, Cigaryno

Maniphest Tasks: T15538

Differential Revision: https://we.phorge.it/D25337
This commit is contained in:
Valerio Bozzolan 2023-07-25 14:12:46 +02:00
parent bf025c5fb4
commit 1e3c9bdfee

View file

@ -197,7 +197,6 @@ final class DifferentialDiffViewController extends DifferentialController {
if (empty($revisions[$selected_id])) {
$selected = id(new DifferentialRevisionQuery())
->setViewer($viewer)
->withAuthors(array($viewer->getPHID()))
->withIDs(array($selected_id))
->requireCapabilities(
array(