Skip to content
New issue

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

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

Already on GitHub? # to your account

APS-2021: Cas1 offender entity. #3091

Merged
merged 1 commit into from
Mar 4, 2025

Conversation

vbala-moj
Copy link
Contributor

@vbala-moj vbala-moj commented Mar 3, 2025

Copy link
Contributor

@davidatkinsuk davidatkinsuk left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a few comments from me 👍

id UUID NOT NULL ,
crn TEXT NOT NULL ,
noms_number TEXT,
tier TEXT,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for the tier can we please use the custom collation specified in APS-1782. I've tried this locally, hopefully it works via flyway SQL:

CREATE COLLATION cas1_tier (provider = icu, locale = 'en-GB', 
rules = $$ 
& ' ' <*a-z <*A-Z < 9 < 8 < 7 < 6 < 5 < 4 < 3 < 2 < 1 < 0 
$$);

CREATE TABLE collation_test(
 value text NULL COLLATE "cas1_tier"
);

val nomsNumber: String?,
/**
* The offender name. This should only be used for search purposes (i.e. SQL)
* If returning the offender name to the user, use the [Cas1OffenderService], which
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the reference in the comment should be to [OffenderService]

Copy link
Contributor Author

@vbala-moj vbala-moj Mar 3, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry, the ticket mentioned this. will revert.
Add a Cas1OffenderService to support this logic.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah I see. In this case the OffenderService should still be used to retrieve information about an offender to present on the UI (i.e., the comment on this field is correct). Cas1OffenderService will only be used manage this offender service table.

I do think the naming is a bit confusing though so maybe it needs a rethink!

@vbala-moj vbala-moj force-pushed the feature/APS-2021-cas1-offender-entity branch from bd36b38 to dc51b91 Compare March 4, 2025 11:03
@vbala-moj vbala-moj force-pushed the feature/APS-2021-cas1-offender-entity branch from dc51b91 to dbc6ff6 Compare March 4, 2025 11:13
@vbala-moj vbala-moj merged commit 79b6859 into main Mar 4, 2025
8 checks passed
@vbala-moj vbala-moj deleted the feature/APS-2021-cas1-offender-entity branch March 4, 2025 11:24
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants