feat: add default reminder setting caldav#58679
Draft
Conversation
Signed-off-by: Grigory Vodyanov <[email protected]>
| '{http://apple.com/ns/ical/}calendar-color' => ['calendarcolor', 'string'], | ||
| '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}deleted-at' => ['deleted_at', 'int'], | ||
| '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_NEXTCLOUD . '}default-alarm' => ['default_alarm', 'string'], | ||
| '{' . \OCA\DAV\DAV\Sharing\Plugin::NS_OWNCLOUD . '}default-alarm' => ['default_alarm', 'string'], |
Contributor
There was a problem hiding this comment.
You don't need the NS_OWNCLOUD
| private const ALLOWED_NC_PROPERTIES = [ | ||
| '{http://owncloud.org/ns}calendar-enabled', | ||
| '{http://owncloud.org/ns}enabled', | ||
| '{http://owncloud.org/ns}default-alarm', |
Contributor
There was a problem hiding this comment.
This should only be required if you need to save the settings in the oc_properties table, since you are doing a custom mapping to the oc_calendars table, pretty sure this is not needed
| $calendarsTable = $schema->getTable('calendars'); | ||
|
|
||
| if (!$calendarsTable->hasColumn('default_alarm')) { | ||
| $calendarsTable->addColumn('default_alarm', Types::STRING, [ |
Contributor
There was a problem hiding this comment.
According to you tests bellow the setting is an integer there for the field should be an integer also, make sure its a SINGED int, so that both positive and negative numbers work. Also I would allow null, so that null means not set, a positive int means alarm after the start and a negative means before the start
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.
Needed for nextcloud/calendar#629
Related to nextcloud/calendar#8031 and nextcloud/cdav-library#995
Checklist
3. to review, feature component)stable32)AI (if applicable)