Skip to content
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

enh(userstatus): add OOO automation and remove calendar automation #41714

Merged
merged 1 commit into from
Nov 28, 2023

Conversation

miaulalala
Copy link
Contributor

@miaulalala miaulalala commented Nov 24, 2023

Summary

2nd try for the OOO automation.

The job handles the OOO automation now.

TODO

  • ...

Checklist

@ChristophWurst
Copy link
Member

#41548 seems fixed 👍

@ChristophWurst
Copy link
Member

My status changes to the short ooo message once the UserStatusAutomation job ran 👍

The status is reverted when I manually cancel my ooo 👍

@ChristophWurst
Copy link
Member

Status changes to dnd when I am outside my working hours 👍

Copy link
Member

@ChristophWurst ChristophWurst left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks sane

DND and OOO automations work as expected

apps/user_status/lib/Db/UserStatus.php Outdated Show resolved Hide resolved
apps/dav/lib/Service/AbsenceService.php Outdated Show resolved Hide resolved
apps/dav/lib/Listener/OutOfOfficeListener.php Outdated Show resolved Hide resolved
apps/dav/lib/Db/AbsenceMapper.php Outdated Show resolved Hide resolved
@ChristophWurst ChristophWurst added this to the Nextcloud 29 milestone Nov 24, 2023
@ChristophWurst
Copy link
Member

/backport to stable28

Copy link
Contributor Author

@miaulalala miaulalala left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The message field can be nullable from the frontend. Breaks with:

Message: Cannot assign null to property OCA\DAV\Db\Absence::$message of type string in file '/var/www/nextcloud/lib/public/AppFramework/Db/Entity.php' line 136

@ChristophWurst
Copy link
Member

The message field can be nullable from the frontend.

#40397 doesn't say anything about optional or required fields, but we need the short message for the status automation and the long one for Mail autoresponders. Let's make them both required. This can be tackled separately, though.

Copy link
Member

@st3iny st3iny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested and wörks.

I also tested the "away" bug by following Christoph's steps and it seems to work correctly.

lib/private/UserStatus/ISettableProvider.php Outdated Show resolved Hide resolved
lib/private/UserStatus/Manager.php Outdated Show resolved Hide resolved
lib/public/UserStatus/IManager.php Outdated Show resolved Hide resolved
lib/public/UserStatus/IManager.php Show resolved Hide resolved
lib/public/UserStatus/IUserStatus.php Outdated Show resolved Hide resolved
lib/public/User/IAvailabilityCoordinator.php Outdated Show resolved Hide resolved
lib/private/User/AvailabilityCoordinator.php Outdated Show resolved Hide resolved
Signed-off-by: Anna Larch <anna@nextcloud.com>
@miaulalala miaulalala force-pushed the enh/add-ooo-and-remove-user-status branch from 6f9c22a to f19645a Compare November 28, 2023 09:28
@miaulalala miaulalala merged commit 258c863 into master Nov 28, 2023
50 checks passed
@miaulalala miaulalala deleted the enh/add-ooo-and-remove-user-status branch November 28, 2023 10:34
@ChristophWurst
Copy link
Member

/backport to stable28

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
5 participants