Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

GRAD2-2570: the issue with pen list search is fixed not to filter nul… #258

Merged
merged 1 commit into from
Apr 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
import org.springframework.web.bind.annotation.*;

import java.util.List;
import java.util.Objects;
import java.util.UUID;

@CrossOrigin
Expand Down Expand Up @@ -287,8 +288,10 @@ public ResponseEntity<List<StudentCredentialDistribution>> getStudentCredentials
public ResponseEntity<List<StudentCredentialDistribution>> getStudentCredentialsForUserRequestDisRunWithNullDistributionDate(
@PathVariable String credentialType, @RequestBody StudentSearchRequest studentSearchRequest,
@RequestHeader(name="Authorization") String accessToken) {
logger.debug("getStudentCredentialsForRegenCertRun : ");
return response.GET(commonService.getStudentCredentialsForUserRequestDisRun(credentialType,studentSearchRequest,true,accessToken.replace(BEARER, "")));
logger.debug("getStudentCredentialsForUserRequestDisRunWithNullDistributionDate : ");
boolean isPenNumberSearch = studentSearchRequest.getPens()!= null && !studentSearchRequest.getPens().isEmpty()
&& !studentSearchRequest.getPens().stream().filter(StringUtils::isNotBlank).toList().isEmpty();
return response.GET(commonService.getStudentCredentialsForUserRequestDisRun(credentialType,studentSearchRequest,!isPenNumberSearch,accessToken.replace(BEARER, "")));
}

@DeleteMapping(EducGradReportApiConstants.ARCH_ACHIEVEMENTS_BY_STUDENTID)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ public void testGetAllStudentCredentialDistributionListWithNullDistributionDate(
final UUID studentID = UUID.randomUUID();
final String credentialType = "E";
final StudentSearchRequest req = new StudentSearchRequest();
req.setPens(List.of("2131231213"));
req.setDistricts(List.of("005"));

// Student Certificate Types
final List<StudentCredentialDistribution> list = new ArrayList<>();
Expand Down
Loading