SDRefugeeTutoring / sdrt-custom-functions

Custom Functions for SDRefugeeTutoring.com
The Unlicense
2 stars 0 forks source link

[EXTREME HIGH PRIORITY] INCLUDE MONTH/DAY OF EVENT IN RSVP & ORIENTATION EMAIL SUBJECTS #83

Closed dreazee closed 1 year ago

dreazee commented 1 year ago

@JasonTheAdams Event Month/Year in the subject of Admin Notification Emails still needs to be fixed. This is super important because this needs to be handled before I can make the Tutoring Events for this trimester, which I wanted to do today. (If we can't sort this out, I need to include the date in the title; if we can make this work, I will leave the date out) Whatever was done previously by the both of us didn't change the email subject. I thought I could do it in the gravity form notification settings, but the only option is to include the RSVP date, NOT the EVENT date.

@JasonTheAdams

Date in Title I tested the RSVP email but there was no date included! I poked around on the Gravity Form and inserted the date into the subject field and also added it to the body of the email. Not sure where you originally made the changes, but it works now! So the Subject now looks like this: "RSVP: Andrea Zeidell WILL attend 09/07/2022 Middle & High School: FIRST DAY of Online Tutoring" I also included the date into the Orientation email notification subject line, too, and will remove the dates from the event title there.

Originally posted by @dreazee in https://github.com/SDRefugeeTutoring/sdrt-custom-functions/issues/78#issuecomment-1242214012

COMMENT FROM PREVIOUS ISSUE #78 : Date in Title You raise a good point regarding RSVP emails. I think my preference would still be to remove it from the Event title. So I've gone ahead and updated the RSVP email subjects to now include the event date! If there are any other places you need to see the date, just let me know!

JasonTheAdams commented 1 year ago

Hi @dreazee!

There are currently two ways for an RSVP to go out:

  1. Via the Volunteer Portal
  2. Via the Event page form

They use two different systems for determining the email subject and message — perhaps as some point I'll consolidate this. I updated the Volunteer Portal way in the last Issue, and updated the Event page form way this time. So both ways should include the Event date in the RSVP email subject. I tested this locally and it worked. Please test it on the live site when you get a chance.

If there's a problem with it go ahead and re-open this Issue.

dreazee commented 1 year ago

@JasonTheAdams So I don't know how to reopen the issue but I just tested all four of the RSVP ways (both ways with Orientation event and both ways with Tutoring Event) and none of the ways produced an email subject line that included the Month/Day of the event :( (see screenshot) Your test RSVP produced a date in the subject line because I added the dates to the actual Event Titles again so I can keep RSVPs straight while we worked on this issue. So a successful Orientation RSVP test would have the date listed twice. I have been testing the Tutoring Dates RSVP notification by using this future event: https://sdrefugeetutoring.com/event/mshs-tutoring-2022-10-04 RSVP email subject

JasonTheAdams commented 1 year ago

@dreazee Ah, I forgot that Orientations are a separate form. I've updated that form's notification now. Please test again.

dreazee commented 1 year ago

@JasonTheAdams Not seeing date in the RSVP forms thru the Portal. This is the Subject line of the email received: "RSVP: Andrea Zeidell WILL attend the Elementary K-5th Grade – FIRST" It's cutting off, so the date may be on the end? Please also move the date before the Event Title and remove "the" for brevity sake. So Subject Line would read: "RSVP: Andrea Zeidell WILL attend 2022-10-04 16:45:00 Elementary K-5th Grade – FIRST DAY of Online Tutoring"

Notification though Gravity Forms are working, though! I just changed the date to show at the beginning of the event. Thank you for adding this Custom Field!

JasonTheAdams commented 1 year ago

Ah yeah, email clients will often clip long subject lines. I've moved the date forward as you suggested. Let me know if that does the trick!

dreazee commented 1 year ago

@JasonTheAdams That's working now! It's just weird because the email subject line isn't getting clipped when notification is being sent through Gravity Forms. Email Subject is only getting clipped when notification is being sent out through the Portal (which will be the predominant way to RSVP) [Screenshot below of what I receive from Portal notification] ALSO, in the Form Submission body that I receive, can you add the Date under "Session", too? I added it to the Gravity Forms. Does this live somewhere that I would be able to adjust myself, like I am able to do in Gravity Forms?

RSVP Form_Email Notification

JasonTheAdams commented 1 year ago

Interesting... let me dig and see what I can find.

JasonTheAdams commented 1 year ago

Ok, after some more digging — I won't even try to explain this one as it's frustratingly technical — I've figured out the issue and have a tentative fix in place. Unfortunately, I'm not actually able to test it locally, so please give it a shot and let me know if the whole subject is showing up now. You actually need to test it with the exact event you were using because the issue is actually with the dash in the event name.

dreazee commented 1 year ago

So strange @JasonTheAdams ! I tested and still not full event name... so I just need to leave out dashes, then? EDIT: I replaced the dash with a colon and event name was cut off after colon... So I guess it doesn't like ANY special characters?

JasonTheAdams commented 1 year ago

@dreazee Nah, I don't want you to have to worry about what characters you use in event names. That would be silly.

I just pushed a change that I think really gets it this time. Please test it out again!

dreazee commented 1 year ago

TESTED AND RETESTED AND THIS WORKS!! Yay for using special characters! Thanks, Jason.

dreazee commented 1 year ago

Actually, @JasonTheAdams I just realized this comment wasn't attended to: In the Form Submission body that I receive, can you add the Date under "Session", too? I added it to the Gravity Forms. Does this live somewhere that I would be able to adjust myself, like I am able to do in Gravity Forms?

RSVP Form_Email Notification

JasonTheAdams commented 1 year ago

All set! I added the date line in bbebb5a