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

CRM457-2303: Caseworker part 1 fixes #867

Merged
merged 29 commits into from
Dec 9, 2024
Merged

CRM457-2303: Caseworker part 1 fixes #867

merged 29 commits into from
Dec 9, 2024

Conversation

ivanELEC
Copy link
Contributor

@ivanELEC ivanELEC commented Dec 5, 2024

Description of change

Link to relevant ticket

Notes for reviewer

  • Take changes to additional_fees? check from enable PR (so we can test before enabling)
  • Fix/add to existing additional_fees controller and system tests
  • Fix logic on Additional Fee view model for assessed claims
  • Split claim and data factories and fix associated tests

@ivanELEC ivanELEC requested a review from a team as a code owner December 5, 2024 17:12
app/models/claim.rb Outdated Show resolved Hide resolved
app/view_models/nsm/v1/additional_fee.rb Show resolved Hide resolved
@elken elken changed the title Crm457 2303 fixes CRM457-2303: Caseworker part 1 fixes Dec 6, 2024
@elken
Copy link
Contributor

elken commented Dec 6, 2024

Just a heads up it looks like some of these fixes clash with what's on #865 so that will have to be rebased

Copy link

sonarcloud bot commented Dec 6, 2024

@elken elken requested a review from patrick-laa December 6, 2024 18:59
@ivanELEC ivanELEC merged commit 66f0350 into main Dec 9, 2024
12 checks passed
@ivanELEC ivanELEC deleted the crm457-2303-fixes-iy branch December 9, 2024 08:46
@@ -102,7 +102,7 @@ def data_for_calculation
private

def youth_court_fee_claimed
data.fetch('include_youth_court_fee_original', data['include_youth_court_fee'])
data['include_youth_court_fee_original'] || data['include_youth_court_fee']
Copy link
Contributor

Choose a reason for hiding this comment

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

Be aware that if this is false, it'll check the other value. I don't think it's what you want to do.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

true (which means somewhere also this is untested - will fix this to be more specific, tbh I'm pretty sure rubocop auto-changed this from code where I check specifically if data['include_youth_court_fee_original'] is nil using .nil?

Copy link
Contributor

Choose a reason for hiding this comment

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

So this is only a problem if include_youth_court_fee_original is false but include_youth_court_fee is true, i.e. if the provider didn't claim the fee but the caseworker awarded it to them anyway. At the moment this can't bite us because I don't think we intend to give caseworkers functionality do that, but it would be a kindness to our future selves to do this properly just in case requirements are added.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is being handled in #865 (for our future selves)

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.

3 participants