Repository navigation
fix(dav): fix event birthday alarms not being updated - #39977
Conversation
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || | ||
| ($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check failure
Code scanning / Psalm
UndefinedPropertyFetch
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || | ||
| ($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check failure
Code scanning / Psalm
UndefinedPropertyFetch
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
UndefinedPropertyFetch
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
PossiblyNullReference
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
UndefinedPropertyFetch
| return ( | ||
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || |
Check notice
Code scanning / Psalm
PossiblyNullReference
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || | ||
| ($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch
| $newCalendarData->VEVENT->DTSTART->getValue() !== $existingBirthday->VEVENT->DTSTART->getValue() || | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() | ||
| $newCalendarData->VEVENT->SUMMARY->getValue() !== $existingBirthday->VEVENT->SUMMARY->getValue() || | ||
| ($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch
03a300c to
f3ccb5d
Compare
f3ccb5d to
24e6ef5
Compare
|
Should we add a repair job just like |
Repair step sounds good to me. |
3ba9335 to
c2c2c8b
Compare
c2c2c8b to
87c8581
Compare
87c8581 to
4451809
Compare
|
Rebased |
| public function run(IOutput $output): void { | ||
| // only run once | ||
| if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes') { | ||
| if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes' && $this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForAlarmFix') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod
| public function run(IOutput $output): void { | ||
| // only run once | ||
| if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes') { | ||
| if ($this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix') === 'yes' && $this->config->getAppValue('dav', 'regeneratedBirthdayCalendarsForAlarmFix') === 'yes') { |
Check notice
Code scanning / Psalm
DeprecatedMethod
|
|
||
| // if all were done, no need to redo the repair during next upgrade | ||
| $this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForYearFix', 'yes'); | ||
| $this->config->setAppValue('dav', 'regeneratedBirthdayCalendarsForAlarmFix', 'yes'); |
Check notice
Code scanning / Psalm
DeprecatedMethod
In #33251 the default offset for a birthday event alarm was changed to 9AM on the day of the event. However the birthdayEvenChanged method did not account for alarm changes, so it was never propagated to existing birthday events, which were kept on midnight. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
…thday calendars So that birthday calendars are immediately updated and we don't need to wait for user to change a card or disable/enable the calendar. We reuse the existing RegenerateBirthdayCalendars repair step instead of adding a new one. Signed-off-by: Thomas Citharel <tcit@tcit.fr>
The trigger was only compared when both the existing and the new birthday event had an alarm, so enabling or disabling the reminder offset never updated existing events. Compare the triggers directly and mention the reminder update in the repair step name. Assisted-by: ClaudeCode:claude-opus-5-5 Signed-off-by: Ferdinand Thiessen <opensource@fthiessen.de>
4451809 to
df6ecfb
Compare
In #33251 the default offset for a birthday event alarm was changed to 9AM on the day of the event.
However the
birthdayEvenChangedmethod did not account for alarm changes, so it was never propagated to existing birthday events, which were kept on midnight.Checklist