Page MenuHomePhorge

Fix exception trying to export empty task list to CSV
ClosedPublic

Authored by aklapper on Wed, May 1, 16:52.
Tags
None
Referenced Files
Unknown Object (File)
Tue, May 14, 23:06
Unknown Object (File)
Fri, May 10, 13:11
Unknown Object (File)
Fri, May 10, 11:45
Unknown Object (File)
Thu, May 9, 19:05
Unknown Object (File)
Tue, May 7, 21:23
Unknown Object (File)
Sun, May 5, 23:33
Unknown Object (File)
Sun, May 5, 23:33
Unknown Object (File)
Sun, May 5, 23:33

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