-
-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
fix(dav): fix event birthday alarms not being updated #39977
base: master
Are you sure you want to change the base?
Conversation
/backport to stable27 |
/backport to stable26 |
/backport to stable25 |
@@ -331,7 +336,8 @@ | |||
|
|||
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() || | |||
($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check failure
Code scanning / Psalm
UndefinedPropertyFetch Error
@@ -331,7 +336,8 @@ | |||
|
|||
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() || | |||
($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check failure
Code scanning / Psalm
UndefinedPropertyFetch Error
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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 Note
@@ -331,7 +336,8 @@ | |||
|
|||
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() || | |||
($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch Note
@@ -331,7 +336,8 @@ | |||
|
|||
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() || | |||
($newCalendarData->VEVENT->VALARM && $existingBirthday->VEVENT->VALARM && $newCalendarData->VEVENT->VALARM->TRIGGER->getValue() !== $existingBirthday->VEVENT->VALARM->TRIGGER->getValue()) |
Check notice
Code scanning / Psalm
PossiblyNullPropertyFetch Note
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
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
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>
87c8581
to
4451809
Compare
Rebased |
/backport to stable28 |
// 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 Note
// 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 Note
@@ -69,5 +56,6 @@ | |||
|
|||
// 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 Note
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.Checklist