Skip to content

Commit

Permalink
[CCAP-651] ctd - Makes countyName search case insensitive (#1218)
Browse files Browse the repository at this point in the history
  • Loading branch information
analoo authored Feb 26, 2025
1 parent dbd44bc commit ffc385b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
8 changes: 7 additions & 1 deletion src/main/java/org/ilgcc/app/data/CountyRepository.java
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,17 @@
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.query.Param;
import org.springframework.stereotype.Repository;

@Repository
public interface CountyRepository extends JpaRepository<County, String> {

@Query("SELECT c FROM County c WHERE UPPER(c.county) = UPPER(:countyName)")
List<County> findByCounty(@Param("countyName") String countyName);

Optional<County> findByZipCode(BigInteger truncatedZip);
List<County> findByCounty(String countyName);


}
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ public void afterPropertiesSet() {
resourceOrganizationRepository.save(PROJECT_CHILD_TEST_DATA);

ACTIVE_PROJECT_CHILD_COUNTY = new County();
ACTIVE_PROJECT_CHILD_COUNTY.setCounty("Ramsey");
ACTIVE_PROJECT_CHILD_COUNTY.setCounty("RamSey");
ACTIVE_PROJECT_CHILD_COUNTY.setZipCode(new BigInteger(zip_62863.getValue()));
ACTIVE_PROJECT_CHILD_COUNTY.setCaseloadCode("QQ");
countyRepository.save(ACTIVE_PROJECT_CHILD_COUNTY);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ void setUp() {
public void setsResourceOrgBasedOnApplicationCountyIfNoHomeAddress() {
Submission submission = new SubmissionTestBuilder()
.withFlow("gcc")
.with("applicationCounty", ACTIVE_FOUR_C_COUNTY.getCounty())
.with("applicationCounty", "DEKALB")
.build();

action.run(submission);
Expand Down

0 comments on commit ffc385b

Please sign in to comment.