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

adjust initial call / appointment date period to diverge a little bit, for late callers #3264

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

colinxfleming
Copy link
Member

@colinxfleming colinxfleming commented Aug 24, 2024

I rule and have completed some work on Case Manager that's ready for review!

Some of the funds we work with are doing some retroactive pledging; in our data model, this conflicts a bit with a rule we enforce of appointment date being after initial call. This PR loosens that rule with a 60 day window - that felt like the point at which it might become an accident. We'll see if it requires further adjustment.

This pull request makes the following changes:

  • allow appointment date to be up to 60 before initial call date

no view changes

It relates to the following issue #s:

For reviewer:

  • Adjust the title to explain what it does for the notification email to the listserv.
  • Tag this PR:
    • feature if it contains a feature, fix, or similar. This is anything that contains a user-facing fix in some way, such as frontend changes, alterations to backend behavior, or bug fixes.
    • dependencies if it contains library upgrades or similar. This is anything that upgrades any dependency, such as a Gemfile update or npm package upgrade.
  • If it contains neither, no need to tag this PR.

@@ -247,7 +247,7 @@ def as_json
private

def confirm_appointment_after_initial_call
if appointment_date.present? && initial_call_date&.send(:>, appointment_date)
if appointment_date.present? && initial_call_date.present? && (initial_call_date - 60.days)&.send(:>, appointment_date)
errors.add(:appointment_date, 'must be after date of initial call')
Copy link
Member

Choose a reason for hiding this comment

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

Should we reword this error?

Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
errors.add(:appointment_date, 'must be after date of initial call')
errors.add(:appointment_date, 'must be closer to the date of initial call')

maybe?

@lomky lomky added the feature label Sep 11, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow initial call date to be after the appointment date
2 participants