-
-
Notifications
You must be signed in to change notification settings - Fork 491
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
4473 expand reminder date possibilities #4606
base: main
Are you sure you want to change the base?
4473 expand reminder date possibilities #4606
Conversation
Via db migrations, replaces the simple integer `reminder_day` with the more complex `reminder_schedule` which is an ical string that can be parsed to a repeating Schedule class. Adjusts the logic in the `fetch_partners_to_reminder_now_service` to use the repeating schedule. Updates related tests.
Builds an ActiveModel, ReminderSchedule, which takes the necessary information and turns it into an IceCubeSchedule, which is what ultimate get saved in the db. Builds the form for this reminder schedule. Still needs to conditionally show or hide sections depending on if the user wants date or day of the week.
Now either while creating new Organization/Partner Groups or editing them, all the transfers from Reminder Date to Reminder Day have been made.
This uses css for ease and accessibility.
Adds a number of refactors, including moving all the create_schedule logic to the deadlinable helper, and creates unit and system tests for the new functionality.
Reintroduces the functionality of having warnings for having the reminder date the same as the deadline date.
…r-date-possibilities
We don't want to create a new schedule if nothing has changed, as it will reset the start date and potentially mess with those who have every 2/3/etc months reminders.
acba202
to
aa3e2f5
Compare
…into 4473-expand-reminder-date-possibilities
aa3e2f5
to
044e6bf
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jlandiseigsti. Thank you! I took this out for a manual test spin, and noticed some things that need attention:
1/ I don't think we need the "Send reminders every X months". If they set a reminder date, then it's monthly.
2/ The reminder date doesn't seem to be persisting.
3/ It's not giving an error if I enter a negative date.
Also a question -- would your method allow "last" in the reminder day of the week area?
Hi, @cielf , I'll get to work addressing those issues. I believe the ice cube gem allows for "Last"...I'll implement that. |
One product question: if an organization wants to indicate that they want to stop sending reminders, how should they indicate on the edit page? Unlike the Partner Group page, there's not a Send Reminder Checkbox. |
My assumption is that they either delete the date, if set to "Date", or choose the Blank Option in every Nth Day, if set to "Day of the Wee". But I wanted to confirm that. |
Also, regarding these two corrections:
Was the value for Every N Months empty when these happened? That's the only way I was able to recreate the errors (as I had written it that Every N Months blank meant no reminder, and thus no validation/saving.) If so, that's great news, as I'm removing the Every N Months. If there was a value for Every N Months when those bugs occurred, there's something else going on I have to figure out. |
All reminders should be Monthly, so every N Months is removed. Also allows users to select "Last" as an option.
That sounds good as a mechanic to me. It matches up to what they would do now. |
Might have been -- there's a placeholder of 1 and I might have just left it like that. |
@dorner I'll be doing a final functional check on this in the next couple of days. Please take a technical review pass on it. Thanks. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For better clarity, can we change "date" to "day of month" throughout for the case where we are picking the nth day of the month, please?
Let's also consistently say "day of the week". Weekday has a different meaning -- i.e. M-F instead of the weekend. [Aside: I would like to find a better term for this, but I haven't yet.]
I haven't yet manually tested whether it is sending out the email appropriately.
<%= f.input :reminder_day, wrapper: :input_group, wrapper_html: { class: 'mb-0' }, | ||
label: 'Reminder day (Day of month an e-mail reminder is sent to partners to submit requests)' do %> | ||
|
||
<%= f.label :date_or_week_day, 'Send reminders on a specific date (eg "the 5th") or a day of the week (eg "the first Tuesday")?' %> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be e.g. instead of eg
Rather than "date" and "week_day", we are now using "day_of_month" and "day_of_week" for clarity.
…r-date-possibilities
dfb4069
to
9a5a757
Compare
Hey @jlandiseigsti Found an unexpected result... If you have a deadline day of the 1st. (Edit: I went in and cleared the reminder day and it still wouldn't clear the error) |
There was a bug in which if the reminder day of the month was the same as the deadline day, it would dislplay the error message even if the user changed to the day of the week option. Now the error message is hidden if the user is selecting the day of the week option.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @jlandiseigsti -- that behaviour works now -- Thanks!
I noticed something I missed on the earlier go-throughs, though.
When we pick a Day of Month and select the day, we are informed of when the next reminder will be sent. I'm not seeing that message when we pick a Day of the Week.
Could you address that, please? Thanks.
ps - the typo is still there.
Hey @jlandiseigsti -- are you still working on this, or shall we see if we can get someone else to finish up? |
Hi @cielf – I think it would be best if I handed it off right now. Life's gotten kind of hectic and I'm not sure when I'll be able to devote the time to finishing it. |
@jlandiseigsti Ok, I'l mark it "Help Wanted", pointing to this PR. If no one picks it up, please feel free to continue with it if things get calmer. |
Resolves #4473
Description
Replaces Reminder Day with Reminder Schedule. This is a recurring schedule that can occur on alternating months, or send reminders based on days of the week. Anywhere that a Organization or Partner Group could have a reminder day now has a reminder schedule.
Type of change
How Has This Been Tested?
System tests to walk through the process.
Model tests to ensure the translation from the form to the ical schedule happens correctly.
Validation tests to ensure that bad data doesn't get submitted.