Page MenuHomePhorge

Workboard: fix regression caused by tags= prefiller
ClosedPublic

Authored by valerio.bozzolan on Mar 31 2023, 08:49.
Referenced Files
F2181237: D25103.id.diff
Tue, May 7, 11:17
Unknown Object (File)
Thu, May 2, 02:44
Unknown Object (File)
Mon, Apr 22, 23:44
Unknown Object (File)
Thu, Apr 11, 14:01
Unknown Object (File)
Thu, Apr 11, 09:59
Unknown Object (File)
Wed, Apr 10, 23:43
Unknown Object (File)
Wed, Apr 10, 23:13
Unknown Object (File)
Wed, Apr 10, 23:05

Details

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

Diff Detail

Repository
rP Phorge
Branch
fix_workboard_milestone
Lint
Lint Passed
Unit
Tests Passed
Build Status
Buildable 208
Build 208: arc lint + arc unit

Event Timeline

src/applications/project/controller/PhabricatorProjectBoardViewController.php
704

The fix just involves a NULL check here ↑

src/applications/project/controller/PhabricatorProjectBoardViewController.php
699

Also, this change gets rid of the id() function. This avoids some CPU cycles for just this syntax sugar, and it makes the code more readable.

There is still more creative space to propose a more-useful tags= prefiller for Milestones, but not here.

This revision is now accepted and ready to land.Mar 31 2023, 09:04