feat(visitor_mailer): change notices with end times and a zone label (PPT-2375, PPT-2667) - #631
Merged
Merged
Conversation
…PPT-2375) Every visitor email now carries event_timezone, the abbreviation of the zone its times are rendered in, so a template can label the times it shows. The invitation, reminder and change emails carry event_end_time / event_end_date, and the change emails also carry previous_event_end_time / previous_event_end_date, so a booking-changed template can show the whole window before and after an edit whichever of the start or end moved.
Crystal's %Z prints the location name (Australia/Perth); %^Z prints the zone abbreviation (AWST), which is what the placeholder documents.
A visitor booking lists its org, region and campus zones beside the
building, and the change notice took the first of them for the previous
room ("Room: Australia" on HIO). Only a zone beneath the previous
building can name its room now.
Only the room branch needs the guard; walking every previous zone up front cost an extra zone lookup per change.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
…default Unset, skip_event_linked_booking_email now tracks disable_event_visitors, so a site with event invites off keeps the linked booking's invitation instead of sending the attendee nothing. Also keeps the last good building zone after a refresh, tidies the format constant and a stray comment, makes the spec's zone-label expectations environment independent and covers the new default (test 73). Readme documents the two attendee invite paths.
A debounce above 3600s waited the full window while invitations were only remembered for 3660s, so a visitor added by the edit could be told about it after all.
There was a problem hiding this comment.
Your trial has ended. Reactivate Greptile to resume code reviews.
This was referenced Sep 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Visitor mailer changes for HIO, tested end to end on hio.uat.placeos.run with real emails.
This branch is Mia's #629 (her commits are included unchanged) plus master and six commits on top, so it supersedes #629.
What is new on top of #629
event_end_time,event_end_date,previous_event_end_time,previous_event_end_date(PPT-2667). The booking-changed email can now read "Time: 11:00am - 12:00pm".event_timezoneplaceholder on every email, the abbreviation of the zone the times are shown in (for example AWST), so a host booking from another time zone sees which zone the times are in. Uses%^Z;%Zprints the location name.time_format: "%l:%M%p %^Z"alternative.skip_event_linked_booking_emailunset now followsdisable_event_visitors, so a site with the event path off keeps the linked booking's invitation instead of sending the attendee nothing (test 73);change_debounceis capped at 3600 so a change never outlives the invite memory; the building zone keeps its last good value across a failed refresh; the spec's zone-label expectation no longer depends on the runner's tzdata; readme section on the two attendee invite paths.Verified on HIO UAT (driver at b9bbed6)
Standalone visitor bookings: create, time change, date change and host change all send the expected single email (invitation, change notice with previous and new blocks and end times, nothing to the visitor on a host change while the original host is notified). Reply-To is the host (PPT-2520, code already merged in #616).
Room bookings with external attendees, with
disable_event_visitors: falseandskip_event_linked_booking_email: true(the master default) plus an "Event details changed" template: one invitation naming the room, one change notice per time or room edit, one invitation to an attendee added later, nothing for other edits. Withdisable_event_visitors: truethe attendee is re-invited on every edit instead, because the front end recreates the linked visitor booking on each save, so that combination is not recommended for change notices.Full scenario log: https://gist.github.com/camreeves/30a177bd87f2a552d19389a118dae057
Specs
crystal build --no-codegenis clean. Locally the harness passes the new and changed tests but keeps failing one of three timing sensitive tests (the two visitors, group booking and shared ical cases) on a loaded machine, and those same tests failed on the untouched tree here, so CI is the arbiter.