Skip to content

Commit

Permalink
Fixed paging in PageCertDecisions
Browse files Browse the repository at this point in the history
  • Loading branch information
mederly committed May 22, 2015
1 parent b4f4a01 commit 59a6c34
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -111,7 +111,9 @@ protected int internalSize() {
try {
Task task = getPage().createSimpleTask(OPERATION_COUNT_OBJECTS);
CertificationManager certificationManager = getPage().getCertificationManager();
List<AccessCertificationCaseType> caseList = certificationManager.searchDecisions(campaignQuery, getQuery(), reviewerOid, null, task, result);
ObjectQuery query = getQuery().clone();
query.setPaging(null); // when counting decisions we need to exclude offset+size (and sorting info is irrelevant)
List<AccessCertificationCaseType> caseList = certificationManager.searchDecisions(campaignQuery, query, reviewerOid, null, task, result);
count = caseList.size();
} catch (Exception ex) {
result.recordFatalError("Couldn't count objects.", ex);
Expand Down
Expand Up @@ -220,6 +220,10 @@ private void setupReviewersForCase(AccessCertificationCaseType _case, AccessCert
AccessCertificationReviewerSpecificationType reviewerSpec, Task task, OperationResult result) throws SchemaException, ObjectNotFoundException {

_case.getReviewerRef().clear();
if (reviewerSpec == null) {
return; // TODO issue a warning here?
}

if (Boolean.TRUE.equals(reviewerSpec.isUseTargetObjectOwner())) {
cloneAndMerge(_case.getReviewerRef(), getTargetObjectOwners(_case, task, result));
}
Expand Down

0 comments on commit 59a6c34

Please sign in to comment.