-
Notifications
You must be signed in to change notification settings - Fork 242
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
Optionally enforce a event alarm type #3997
Optionally enforce a event alarm type #3997
Conversation
Not both, then ? |
lib/Controller/ViewController.php
Outdated
@@ -93,6 +94,10 @@ public function index():TemplateResponse { | |||
$slotDuration = $this->config->getUserValue($this->userId, $this->appName, 'slotDuration', $defaultSlotDuration); | |||
$defaultReminder = $this->config->getUserValue($this->userId, $this->appName, 'defaultReminder', $defaultDefaultReminder); | |||
$showTasks = $this->config->getUserValue($this->userId, $this->appName, 'showTasks', $defaultShowTasks) === 'yes'; | |||
$forceEventAlarmType = $this->config->getAppValue($this->appName, 'force_event_alarm_type', ''); |
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.
camelCase as well
That would be equal to no enforcement. Right now you can also only pick between EMAIL/DISPLAY and nothing else unless that was already present in the event. |
93f68f3
to
d90c27c
Compare
d90c27c
to
6f66f34
Compare
Any other value set by another client still shows up. This only "enforces" the alarm type for those who only use the Calendar app. Signed-off-by: Christoph Wurst <[email protected]>
6f66f34
to
dfa5e8f
Compare
Codecov Report
@@ Coverage Diff @@
## main #3997 +/- ##
============================================
+ Coverage 29.47% 29.49% +0.02%
- Complexity 323 324 +1
============================================
Files 220 220
Lines 7583 7594 +11
Branches 1002 1004 +2
============================================
+ Hits 2235 2240 +5
- Misses 5348 5354 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
By default I cannot select the reminder type anymore (no config switch set). Is this the expected behavior? Otherwise, I would have expected this condition... calendar/src/components/Editor/Alarm/AlarmListItem.vue Lines 269 to 271 in bba3cd5
... to be |
@@ -114,6 +119,7 @@ public function index():TemplateResponse { | |||
$this->initialStateService->provideInitialState('show_tasks', $showTasks); | |||
$this->initialStateService->provideInitialState('tasks_enabled', $tasksEnabled); | |||
$this->initialStateService->provideInitialState('hide_event_export', $hideEventExport); | |||
$this->initialStateService->provideInitialState('force_event_alarm_type', $forceEventAlarmType); |
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.
Based om the docs is null not allowed as key:
https://github.com/nextcloud/server/blob/3e067edcbe80797a70118f613ac4b752ce512992/lib/public/AppFramework/Services/IInitialState.php#L45
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.
Yes, as mentioned in #4051, this causes log entries.
Not sure if your occ command is intentionally using |
But like this you force the reminder type to email. This changes the default behavior where you can choose the alarm type in the UI. |
This contributes the second part of #3993.
DISPLAY
orEMAIL
as alarm typeI will update the Calendar admin docs for this.