Page 1 of 1

User loosing favorites when adding device

Posted: Saturday 22 May 2021 21:09
by modjor
Hi everyone,

i'm seeing an issue since Domoticz 2020.1. I just updated to 2021.1 but same behavior still occurs regarding users loosing their favorites :

Steps to duplicate
- Create a new user John (user, not admin or spectator)
- Assign some devices to this user
- Logon using this john user account
- Add some devices to your favorites
- Logon as admin, add a new device to user John devices list.
- Logon as user John, open the main dashboard with your favorites

Result : User lost all his favorites and need to recreate them.
Expected result : all favorites added before the new devices was added to this user device list should still be present as favorites.

I can see this behavior on Domoticz 2021.1, on Synology docker and RPi.

I was going to create a bug report on github, but would like to start here first (maybe it some kind of expected behavior...?)
Any idea whats going on ?

Thanks!

Re: User loosing favorites when adding device

Posted: Saturday 22 May 2021 22:18
by waaren
modjor wrote: Saturday 22 May 2021 21:09 User lost all his favorites and need to recreate them.
Thx for reporting!
This is indeed an oversight in the code (main/WebServer.cpp line 13067-13087) I will create a Pull Request to fix this. It might take some time and it will only be available in a future build.

Re: User loosing favorites when adding device

Posted: Saturday 22 May 2021 22:36
by modjor
Cool, thanks for letting me know I was not crazy ;) I will keep an eye on the futures changelogs.
And thanks for the amazing work. I've been using Domoticz for a couple of years now, and I'm loving it (1 master, 2 slaves, orchestrating lights, watering, mouse traps etc... works like a charm !).

Re: User loosing favorites when adding device

Posted: Saturday 22 May 2021 23:59
by waaren
modjor wrote: Saturday 22 May 2021 21:09 User lost all his favorites and need to recreate them.
Should be fixed when PR 4838 is merged.

Re: User loosing favorites when adding device

Posted: Monday 24 May 2021 3:08
by modjor
waaren wrote: Saturday 22 May 2021 23:59 Should be fixed when PR 4838 is merged.
Thank you !