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

Check for ongoing recurring events when making date-based event calculations. #795

Merged
merged 1 commit into from
Oct 25, 2024

Conversation

timcosgrove
Copy link
Contributor

@timcosgrove timcosgrove commented Oct 15, 2024

Description

This corrects an error where a recurring event that is in progress would show the following event's date while the event was still in progress. A recurring event that is currently in progress should show the current date until the event window has passed.

Ticket

department-of-veterans-affairs/va.gov-cms#19470

Developer Task

Tasks

Preview Give feedback

Testing Steps

Testing existing recurring events

We are looking at this event: https://main-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov/outreach-and-events/events/73053
This event runs daily through Oct 30, from 9:00 am - 5:00 pm ET, which makes it a good candidate for testing of ongoing recurring events.

  1. On any given day, before 5:00 pm ET, the following URL should show 'When' as the current day: https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/73053/
    image
    Compare this to Dev currently, which will incorrectly show the following day once the current day's event starts at 9:00 am ET: https://dev.va.gov/outreach-and-events/events/73053/
  2. On any given day, after 5:00 pm ET, the following URL should show 'When' as the following day: https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/73053/
  3. On the listing page, while the event is ongoing (i.e. before 5:00 pm ET), the shown date should be today's date: https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/
    image
  4. On the listing page, when the event is completed for the day (after 5:00 pm ET), the shown date should be tomorrow's date: https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/

Testing new ongoing events that are not recurring

Note: this test is optional, in the event that you want to use custom test events in addition to examining existing events.

In all cases, you can create new content at this CMS instance: https://main-medc0xjkxm4jmpzxl3tfbcs7qcddsivh.ci.cms.va.gov/

This CMS is the data source for the Next Build Tugboat instance we are currently testing. Publish the events to the National Outreach & events calendar, so that you know where to look for them.

  1. Create a new event that is not recurring. Make the date & time match something that you can test in the near future, so that you can observe it shifting from being visible to not being visible. Make the end time at least 1 hour in the future, so that it has time to republish.
  2. Create a new event that is recurring. Again, make the date & times match something where you can observe the time window when the event is 'in progress' and then when it is over. You want there to be a future recurrence of the event to exist. Again, make the end time at least 1 hour in the future so that you can test the window after the content is republished.
  3. Visit the Tugboat management page for this test instance: https://tugboat.vfs.va.gov/670eb4b525a4ad7d760d45ae. Rebuild the test instance. This may take as long as 45 minutes.
  4. Once the site is rebuilt, visit the calendar page you published the events to, for example https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/. Make sure you are in the window before your test events end, i.e. the event is 'ongoing'.
    a. For the non-recurring event, the event should show in the 'All upcoming' filter.
    b. For the recurring event, the event should show in the 'All upcoming' filter, and the date & time shown should be today's date.
  5. Visit the individual recurring event while the event is still 'ongoing'. The date & time shown should be today's date.
  6. Wait until the event time window has passed.
  7. Visit the calendar page you published the events to, for example https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/.
    a. For the non-recurring event, the event should show in the 'Past events' filter.
    b. For the recurring event, the event should show in the 'All upcoming' filter, and the date & time shown should be tomorrow's date.
  8. Visit the individual recurring event after the event has finished for the day. The date & time shown should be tomorrow's date.

QA steps

What needs to be checked to prove this works?
What needs to be checked to prove it didn't break any related things?
What variations of circumstances (users, actions, values) need to be checked?

Screenshots

Before is on the right, after is on the left. The difference can be observed in the 'When' time.
image

Reviewer

Reviewing a PR

This section lists items that need to be checked or updated when making changes to this repository.

Standard Checks

Tasks

Preview Give feedback

@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 15, 2024 18:30 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 21, 2024 19:13 Destroyed
@va-cms-bot va-cms-bot temporarily deployed to Tugboat October 21, 2024 19:31 Destroyed
@timcosgrove timcosgrove changed the title DNM: Check for ongoing events when making date-based event calculations. Check for ongoing recurring events when making date-based event calculations. Oct 21, 2024
@randimays
Copy link
Contributor

randimays commented Oct 22, 2024

@timcosgrove Event detail page looks good, but I'm seeing yesterday's event on the event listing page (here: https://pr795-sqczpa1lsqkrhxqurt8pmzmjjxf2rytt.tugboat.vfs.va.gov/outreach-and-events/events/?endDateDay=23&endDateMonth=10&endDateYear=2024&selectedOption=custom-date-range&startDateDay=21&startDateMonth=10&startDateYear=2024)

Tim pointed out in Slack that since my filters include yesterday, the behavior is as expected. The event for today appears later in the results. Disregard this comment!

Screenshot 2024-10-22 at 11 06 24 AM

Copy link
Contributor

@randimays randimays left a comment

Choose a reason for hiding this comment

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

LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants