-
Notifications
You must be signed in to change notification settings - Fork 57
Improve Emails (used to be 317 checkin emails) #519
Conversation
@@ -18,6 +18,10 @@ | |||
float:right; | |||
} | |||
|
|||
#model_name { |
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.
This doesn't seem to belong here; I think this was a fix to a small bug with cart positioning. I think I'll take this change out of this pull request, make an issue for the cart positioning, and add a new branch with this change for the that issue. @caseywatts does that make sense?
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.
I can't find an element with this ID anywhere in the cart sidebar. I'm going to simply remove this code for now since it is both unrelated to this issue and seems to do nothing; we can always revert / add this later if necessary.
|
||
desc "Send email to admin on overdue reservations checked in with fine" | ||
task :send_overdue_checked_in_fine_admin => :environment do | ||
overdue_checked_in = Reservation.where("checked_out IS NOT NULL and checked_in IS NOT NULL and due_date < checked_in") |
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.
Won't this send an e-mail for every past overdue reservation (e.g. every old reservation that was checked in overdue) whenever the rake tasks are run? We need this to be sent only once... not sure how to test this.
Ok, I just tried testing this in my local development environment and it seems to be broken. It's definitely registering false positives, in that it's sending e-mails for reservations that were returned on time, but more critically, the e-mails (particularly the admin ones) are not nearly detailed enough. We should be providing the entire timeline of the reservation, from creation, start date, check-out, due date, and check-in, along with the actual user who made the reservation, and maybe the checkout persons who checked the equipment in and out. I'm bumping this pull request to the next milestone, here's a to-do list before release:
Let's make sure that this feature is both well thought out and well tested! |
Emails sent for 'Checking in overdue items' that should only be sent once per day: I think if we check that the check-in date was We should also combine the new email into one email and put it as one of the customizable emails in appconfig Actually, we should just combine the user mailer and the admin mailer into one mailer... I don't see why we need two classes to send emails. Can't we just have one class that has different methods for mailing to different users..? Anyway, that's gonna be a bit too much trouble to sort out just now, but what we can do is at least just cc the admin in the user mail instead of having 2 email templates Merge conflicts suck, since this is a pretty old issue I'm going to merge dev into it just to keep it up to date moving forward Also, it seems that we have two different issues relating to emails.. (#541).. |
This reverts commit ce0eb77.
Merged #541
Edit: |
Emails that are currently disabled/commented out
What do we want to do with these? The commented out lines are for buttons that (I presume) the staff would be able to push to send an email confirmation for reservation/checkin/checkout to the user. |
This is ready to go~ |
"@equipment_list@\n\n"\ | ||
"If the equipment is returned after 4 pm on @return_date@ you will be charged a late fee or replacement fee. Repeated late returns will result in the privilege to make further reservations for the rest of the term to be revoked.\n\n"\ | ||
"If you fail to return your equipment on time the curse of @department_name@ will be placed upon you and your kin for 7 generations. Also, you will have to pay a late fee of @late_fee@ per day. If you have lost the item you may have to pay a replacement fee and/or sacrifice your first born child.\n"\ |
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.
please change this.
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.
Aww. you know this is just the default we ship to new clients and that the admin can write their own template, right?
Anyway, I changed it.
Looks good, nice work! |
Improve Emails (used to be 317 checkin emails)
Per issue 317, when a user returns a piece of overdue equipment, UserMailer sends an email to the user with the name of the equipment, its notes, and the late fee. AdminMailer sends a very similar email to the admin with the same information.