From e1009614534d869c1df58b3258cb8ae50883d8cb Mon Sep 17 00:00:00 2001 From: Bob Trahan Date: Tue, 17 Feb 2015 11:06:21 -0800 Subject: [PATCH] workboards - make errors from filtering show up Summary: Fixes T7252. The UI is slightly different than in Maniphest - in Maniphest the error shows up at the bottom and here it shows up the top - but I think the UI here makes sense as you see the error right away on the newly returned dialogue? Test Plan: set "created after" to "assdaasds" and got an error back. set filter to something that should work and it worked Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Maniphest Tasks: T7252 Differential Revision: https://secure.phabricator.com/D11760 --- .../PhabricatorProjectBoardViewController.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/applications/project/controller/PhabricatorProjectBoardViewController.php b/src/applications/project/controller/PhabricatorProjectBoardViewController.php index e1e05068d6..3315a206b6 100644 --- a/src/applications/project/controller/PhabricatorProjectBoardViewController.php +++ b/src/applications/project/controller/PhabricatorProjectBoardViewController.php @@ -101,6 +101,19 @@ final class PhabricatorProjectBoardViewController if ($request->isFormPost()) { $saved = $engine->buildSavedQueryFromRequest($request); $engine->saveQuery($saved); + $filter_form = id(new AphrontFormView()) + ->setUser($viewer); + $engine->buildSearchForm($filter_form, $saved); + if ($engine->getErrors()) { + return $this->newDialog() + ->setWidth(AphrontDialogView::WIDTH_FULL) + ->setTitle(pht('Advanced Filter')) + ->appendChild($filter_form->buildLayoutView()) + ->setErrors($engine->getErrors()) + ->setSubmitURI($board_uri) + ->addSubmitButton(pht('Apply Filter')) + ->addCancelButton($board_uri); + } return id(new AphrontRedirectResponse())->setURI( $this->getURIWithState( $engine->getQueryResultsPageURI($saved->getQueryKey())));