Skip to content

Commit

Permalink
Merge pull request #137 from intuit/feature/ui_fix_filter_bugs
Browse files Browse the repository at this point in the history
URL encoding the parameter for free text search, as providing an equa…
  • Loading branch information
longdogz committed Nov 21, 2016
2 parents 2b7f40f + 8e0b5e0 commit 92bc1d4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion modules/ui/app/scripts/controllers/ExperimentsCtrl.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,7 +282,7 @@ angular.module('wasabi.controllers').
};
if ($scope.data.lastSearchWasSimple) {
// Add simple filter info, if available
queryParams.filter = $scope.data.query;
queryParams.filter = encodeURIComponent($scope.data.query);
if ($scope.data.hideTerminated) {
queryParams.filter += ',state_exact=notTerminated';
}
Expand All @@ -300,6 +300,11 @@ angular.module('wasabi.controllers').
queryParams.filter = addAdvParam(queryParams.filter, 'experiment_label=' + $.trim($scope.data.advExperimentName));
}
if ($scope.data.adv1stDateSearchType !== 'isAny') {
if ($scope.data.advTxtSearchDateOne.length === 0 ||
($scope.data.adv1stDateSearchType === 'isBetween' && $scope.data.advTxtSearchDateTwo.length === 0)) {
UtilitiesFactory.displayPageError('Missing Date', 'You must provide a value for the search date.');
return false;
}
queryParams.filter = addAdvParam(queryParams.filter, 'date_constraint_' +
($scope.data.advStartOrEndDate === 'startDate' ? 'start' : 'end') +
'=' +
Expand Down

0 comments on commit 92bc1d4

Please sign in to comment.