@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Workboard: fix regression caused by tags= prefiller

Summary:
This change fixes a regression introduced here:

rP5e2b3677157889104a7e540d7772a04f13164037

Thank you to the user @dadalha for auditing that commit
and sharing a stack trace to easily fix the issue.

In short, if you see this exception you are affected:

```
EXCEPTION: (InvalidArgumentException)
Value provided to "replaceQueryParam()" for key "tags" is NULL.
Use "removeQueryParam()" to remove a query parameter.
at [<arcanist>/src/parser/PhutilURI.php:341]
```

This change just fixes that specific problem.

Closes T15221

Test Plan:
1. Create a new Project
2. Create a new Milestone inside
3. Create the Milestone's Workboard
4. Visit the Milestone's Workboard and note that now it works

Reviewers: O1 Blessed Committers, avivey

Reviewed By: O1 Blessed Committers, avivey

Subscribers: speck, tobiaswiese, Matthew, Cigaryno, dadalha

Tags: #workboard

Maniphest Tasks: T15221

Differential Revision: https://we.phorge.it/D25103

+10 -2
+10 -2
src/applications/project/controller/PhabricatorProjectBoardViewController.php
··· 693 693 ->newCreateActionSpecifications(array()); 694 694 695 695 foreach ($specs as $spec) { 696 + 697 + // Prefill tags= when you open the Column menu 698 + // https://we.phorge.it/T15147 699 + $spec_href = new PhutilURI($spec['uri']); 700 + $spec_slug = $project->getPrimarySlug(); 701 + if ($spec_slug !== null) { 702 + $spec_href->replaceQueryParam('tags', $spec_slug); 703 + } 704 + 696 705 $column_items[] = id(new PhabricatorActionView()) 697 706 ->setIcon($spec['icon']) 698 707 ->setName($spec['name']) 699 - ->setHref(id(new PhutilURI($spec['uri'])) 700 - ->replaceQueryParam('tags', $project->getPrimarySlug())) 708 + ->setHref($spec_href) 701 709 ->setDisabled($spec['disabled']) 702 710 ->addSigil('column-add-task') 703 711 ->setMetadata(