SparkDevNetwork / Rock

An open source CMS, Relationship Management System (RMS) and Church Management System (ChMS) all rolled into one.
http://www.rockrms.com
563 stars 345 forks source link

Malformed iCal code when saving a Schedule by Day #5918

Closed joannnaburress closed 1 week ago

joannnaburress commented 2 weeks ago

Description

When a Schedule runs Monthly and recurs on the First [Day of Week] of the month, the iCal code that is being generated is missing a '1' in front of the day of the week code. For this schedule: image

It is set to run on the 1st Tuesday of the month, but the malformed iCal code is registering as "The Tuesday of every month" image

When we preview the iCal code & upcoming dates, we see the schedule is calculating on EVERY Tuesday, not just the 1st image

When the iCal code is being generated for the 1st day-of-week monthly occurrence, it is missing the 1 before TU RRULE:FREQ=MONTHLY;BYDAY=TU and should be outputting RRULE:FREQ=MONTHLY;BYDAY=1TU

Actual Behavior

When the iCal code is being generated for the 1st day-of-week monthly occurrence, it is outputting RRULE:FREQ=MONTHLY;BYDAY=TU which is causing occurrences to be calculated for EVERY Tuesday, and is rendering in the Schedule description as "The Tuesday of every month"

Expected Behavior

When iCal code is generated for the 1st day-of-week monthly occurrence, I would expect it to output RRULE:FREQ=MONTHLY;BYDAY=1TU which would calculate only first-Tuesday-of-the-month occurrences, and would render in the Schedule description as "The 1st Tuesday of every month"

Steps to Reproduce

Issue Confirmation

Rock Version

16.2 (Demo site), 16.4

Client Culture Setting

en-US

chead4 commented 1 week ago

Hi Joanna

I will be closing this issue as it has been resolved by #5894, and the fix will be in v16.6. While the descriptions of the two issues differ slightly, the underlying problem is the same.