diff --git a/.gitignore b/.gitignore index 4a60582..6a85866 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *.iml .idea +.history diff --git a/bower.json b/bower.json index d9138e3..7b1157e 100644 --- a/bower.json +++ b/bower.json @@ -1,7 +1,7 @@ { "name": "stratajs", "description": "JavaScript Library to interact with the Red Hat Customer Portal API", - "version": "1.6.8", + "version": "1.6.9", "main": "strata.js", "repository": { "type": "git", diff --git a/strata.js b/strata.js index 141628e..7ceca19 100644 --- a/strata.js +++ b/strata.js @@ -1165,16 +1165,21 @@ }); }; - strata.cases.advancedSearch = function (onSuccess, onFailure, query, order, offset, limit, format, caseFields, caseStatus, caseOwner, caseGroup, accountNumber, searchString, sortField) { + strata.cases.advancedSearch = function (onSuccess, onFailure, query, order, offset, limit, format, caseFields) { if (!$.isFunction(onSuccess)) { throw 'onSuccess callback must be a function'; } if (!$.isFunction(onFailure)) { throw 'onFailure callback must be a function'; } if (limit === undefined) { limit = 50; } if (offset === undefined) { offset = 0; } var url = strataHostname.clone().setPath("/rs/cases"); - prepareURLParams(url, caseStatus, caseOwner, caseGroup, accountNumber, searchString, sortField, order, offset, limit, query, null); + url.addQueryParam('query', query); url.addQueryParam('newSearch', true); + url.addQueryParam('limit', limit); + url.addQueryParam('offset', offset); caseFields && caseFields.length > 0 && url.addQueryParam('fl', caseFields.join(',')); + if (order != null) { + url.addQueryParam('sort', order); + } var ajaxParams = { url: url,