Page MenuHomePhabricator

Fix Maniphest Next button not working when default query has 100+ results.
ClosedPublic

Authored by brechtvl on Nov 27 2013, 8:13 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Dec 20, 8:10 PM
Unknown Object (File)
Thu, Dec 12, 4:20 AM
Unknown Object (File)
Mon, Dec 9, 1:17 PM
Unknown Object (File)
Sat, Dec 7, 4:36 PM
Unknown Object (File)
Sat, Dec 7, 2:49 PM
Unknown Object (File)
Wed, Dec 4, 11:04 PM
Unknown Object (File)
Wed, Dec 4, 3:12 AM
Unknown Object (File)
Sat, Nov 30, 1:52 PM

Details

Summary

If there is no /query in the URL, the default query would be lost when clicking Next, causing the search form to be shown on the second page. This is not so likely to happen on a standard Phabricator installation because the default query is Assigned, and few people will have 100+ tasks assigned.

Test Plan
  • Go to /maniphest/query/edit/
  • Move Open Tasks to the top
  • Go to /maniphest/
  • Click Next on the bottom right
  • See only tasks that are actually open

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

There may be a better and more compact way to fix this, I'm no PHP developer, but this solved the issue here.

This seems reasonable to me. I might just do something like:

$data = ...
unset($data['before']);
unset($data['after']);
if ($data) {

}

...were I writing it myself, but I don't think that's dramatically cleaner.