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

Cas2bail/spike1 #2671

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft

Cas2bail/spike1 #2671

wants to merge 3 commits into from

Conversation

tobybatchmoj
Copy link

This is the second method of adding bail support to the CAS2 application without duplicating the controller/service/entity.

private fun getApplicationOriginFromJpa(summary: Cas2ApplicationSummaryEntity): ApplicationOrigin {
return when {
summary.applicationOrigin == "bail" -> ApplicationOrigin.bail
else -> ApplicationOrigin.court
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 this should be else -> ApplicationOrigin.hdc as at this point it's which service is it coming from HDC or Bail

Copy link
Contributor

Choose a reason for hiding this comment

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

would it be good to differentiate the bail types here also?

Copy link
Contributor

Choose a reason for hiding this comment

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

Should this also be specific of bail or court - and error if it is neither?

@adamhughes86
Copy link
Contributor

As a proof of concept this looks good. It's nice and simple and we can see the steps involved in adding one field to the main application data.

For anyone looking into the actual ApplicationOrigin data, this will still need to be considered

ApplicationOrigin:
type: string
enum:
- bail
Copy link
Contributor

Choose a reason for hiding this comment

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

as per previous comment - perhaps expand these to include hdc, and better differentiate the 2 types of bail e.g. prisonBail,courtBail,hdc ?

Copy link
Contributor

Choose a reason for hiding this comment

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

agree - though lets use homeDetentionCurfew instead of hdc as it's clearer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants