Skip to content

Commit

Permalink
Merge pull request #71 from anujsi/pcm-8469
Browse files Browse the repository at this point in the history
PCM-8469 - Advanced case search not returning expected results .
  • Loading branch information
anujsi authored Jul 24, 2019
2 parents 468c670 + 5451ac9 commit e11398f
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
*.iml
.idea
.history
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down
9 changes: 7 additions & 2 deletions strata.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down

0 comments on commit e11398f

Please sign in to comment.