Page MenuHomePhorge

Fix exception trying to export empty task list to CSV
ClosedPublic

Authored by aklapper on May 1 2024, 16:52.
Tags
None
Referenced Files
F3333840: D25613.1743540620.diff
Mon, Mar 31, 20:50
F3328711: D25613.1743461299.diff
Sun, Mar 30, 22:48
F3328604: D25613.1743458611.diff
Sun, Mar 30, 22:03
F3318534: D25613.1743286580.diff
Fri, Mar 28, 22:16
F3289959: D25613.1742856753.diff
Sun, Mar 23, 22:52
F3284095: D25613.1742766615.diff
Sat, Mar 22, 21:50
F3249473: D25613.1742286262.diff
Mon, Mar 17, 08:24
F3220256: D25613.1741800671.diff
Tue, Mar 11, 17:31

Details

Summary

Check that we have objects with PHIDs before running a query. If there are none, return an empty array instead.

EXCEPTION: (Exception) Edge list passed to "withSourcePHIDs(...)" is empty, but it must be nonempty. at [<phorge>/src/infrastructure/edges/query/PhabricatorEdgeQuery.php:50]

Closes T15789

Test Plan
  • Log into Phorge, go to http://phorge.localhost/maniphest/query/assigned/ and make sure you have zero assigned tasks.
  • Click "Use Results" and select "Export Data".
  • In the "Export Results" dialog, keep default Format = csv and click "Download Data".
  • After applying the patch, get the expected dialog "Download File - Download file assigned.csv (264 B)?" and resulting file with only column headers and no data, instead of an unhandled exception.

Diff Detail

Repository
rP Phorge
Lint
Lint Not Applicable
Unit
Tests Not Applicable