Skip to content

fix(userstatus): Fix setting and reverting status for busy calendar - #41570

Closed
ChristophWurst wants to merge 1 commit into
masterfrom
fix/userstatus/set-revert-calendar-busy
Closed

ChristophWurst wants to merge 1 commit into
masterfrom
fix/userstatus/set-revert-calendar-busy

Conversation

@ChristophWurst

@ChristophWurst ChristophWurst commented Nov 17, 2023 •

Copy link
Copy Markdown
Member

Summary

  • Remove calendar busy state from being a persistent.
  • Stop setting a status for BUSY-TENTATIVE and BUSY-UNAVAILABLE. These should not have any meaning for the status.
  • Revert calendar status as soon as the calendar no longer reports business.

How to test

  1. Ensure the test user has calendars but opening the Calendar app once
  2. Ensure the user has an email address set
  3. Have no ongoing events
  4. Set personal availability so you are current out of office
  5. Clear oc_user_status
  6. Reload the page twice

Master: user online status is Away
Here: user online status is Online

Checklist

@ChristophWurst ChristophWurst added the 2. developing Work in progress label Nov 17, 2023
@ChristophWurst ChristophWurst self-assigned this Nov 17, 2023
@ChristophWurst

Copy link
Copy Markdown
Member Author

Thanks to revert, I can now

  1. Set a custom status message
  2. Go into a meeting
  3. The meeting ends
  4. My custom status returns

@nickvergessen nickvergessen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Makes sense and fixed production

@nickvergessen nickvergessen added this to the Nextcloud 28 milestone Nov 17, 2023
@blizzz blizzz mentioned this pull request Nov 20, 2023
1 of 5 tasks
@ChristophWurst ChristophWurst removed this from the Nextcloud 28 milestone Nov 22, 2023
@blizzz blizzz added this to the Nextcloud 29 milestone Nov 23, 2023
@ChristophWurst

Copy link
Copy Markdown
Member Author

Conflicts resovled


public function getMessage(): ?string {
return $this->message;
public function getMessageId(): string {

Check failure

Code scanning / Psalm

InvalidNullableReturnType

The declared return type 'string' for OCA\DAV\CalDAV\Status\Status::getMessageId is not nullable, but 'null|string' contains null
public function getMessage(): ?string {
return $this->message;
public function getMessageId(): string {
return $this->messageId;

Check failure

Code scanning / Psalm

NullableReturnStatement

The declared return type 'string' for OCA\DAV\CalDAV\Status\Status::getMessageId is not nullable, but the function returns 'null|string'
@ChristophWurst

Copy link
Copy Markdown
Member Author

Tested and still works. On master I stay on Away, here my active user is Online

@ChristophWurst
ChristophWurst force-pushed the fix/userstatus/set-revert-calendar-busy branch from f3db3e6 to 7aca52e Compare November 24, 2023 08:10
* Remove calendar busy state from being a persistent.
* Stop setting a status for BUSY-TENTATIVE and BUSY-UNAVAILABLE. These
  should not have any meaning for the status.
* Revert calendar status as soon as the calendar no longer reports
  business.

Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
@ChristophWurst
ChristophWurst force-pushed the fix/userstatus/set-revert-calendar-busy branch from 7aca52e to 9cc7733 Compare November 24, 2023 08:11
@GretaD

GretaD commented Nov 24, 2023 •

Copy link
Copy Markdown
Contributor

tested and works, on master no matter how many times i change the status, when i change the app or refresh, it goes back to away, on this branch the online status is saved correctly.

@ChristophWurst

Copy link
Copy Markdown
Member Author

Obsolete

@ChristophWurst
ChristophWurst deleted the fix/userstatus/set-revert-calendar-busy branch November 29, 2023 07:53
@nickvergessen
nickvergessen restored the fix/userstatus/set-revert-calendar-busy branch November 29, 2023 10:37
@nickvergessen
nickvergessen deleted the fix/userstatus/set-revert-calendar-busy branch November 29, 2023 10:37
@skjnldsv skjnldsv removed this from the Nextcloud 29 milestone Feb 23, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: User status automation sets status to *Away* despite activity

6 participants