Page MenuHomePhorge

Allow only unique group names in the local addressbook
Closed, ResolvedPublic

Assigned To
Authored By
Robert_Selk
Aug 9 2016, 9:21 AM
Referenced Files
F202985: 612-02.png
Aug 9 2016, 9:21 AM
F202992: 612-05.png
Aug 9 2016, 9:21 AM
F5: profile-photo.jpg
Aug 9 2016, 9:21 AM
F202987: 612-03.png
Aug 9 2016, 9:21 AM
F202983: 612-01.png
Aug 9 2016, 9:21 AM
F202990: 612-04.png
Aug 9 2016, 9:21 AM

Description

Currently users can create multiple groups with the same name in the local addressbook. After a page refresh (F5) only the last created group is shown in the addressbook. If the user deletes the Group and press F5 again, the group created before is shown.

Description:

  1. User creates a local group called "Test" and moves some contacts to the group.

612-01.png (308×644 px, 12 KB)

  1. User creates two empty groups with the same name "Test". In total we have three groups with the same name.

612-02.png (343×653 px, 15 KB)

Before the page is refreshed, all three groups are shown.

  1. After page refresh (F5), only the last created group is visibile.

612-03.png (273×667 px, 8 KB)

  1. User deletes the group "Test" and press F5. Now he can see second group he created before.

612-04.png (270×646 px, 8 KB)

  1. User deletes the group "Test" and press F5 again.

612-05.png (357×663 px, 15 KB)

Now he can see the first group with the contacts.

It should not be possible to create multiple groups with the same name.

Details

Ticket Type
Task

Event Timeline

The default sql addressbook in Roundcube has functionality that makes sure new group (or renamed group) name is always unique instead of throwing an error. E.g. If you have group "My Group" and you try to create another with the same name, Roundcube will just create group with name "My Group 2".

So now, which is better, the above solution or just error? If we decide the error is better, we should probably also change the default addressbook behaviour.

But it is not shown in the addressbook as "My Group 2". Only "My Group" is shown but with the Content of "My Group 2".

I was talking about default behavior of sql addressbook (which you do not use), just to show possible (counter) solution.

There's no technical provision that prevents us from allowing users to create multiple groups by the same name, provided that the data-to-presentation application logic uses keys that uniquely tie an entry to a (specific instance of a) group. Both SQL (primary index auto-increment) and Kolab (xml/uuid) provide these artifacts.

I don't see a particular use-case for multiple groups with the same name other than in a shared folder scenario (albeit the path to the folders that contain the groups with the same name would be different), but there's certainly no technical limitation to allow the users to shoot themselves in the foot should they choose to.

machniak claimed this task.

Fixed display issue.