contacts icon indicating copy to clipboard operation
contacts copied to clipboard

Rename a group

Open lucavallerini opened this issue 5 years ago • 34 comments

A pretty basic feature is missing: the ability to rename a group. At the moment (3.0.3) the only way to "rename" a group is to add each contact one by one to a new group. Ideally, I'd like a three-dotted menu at the end of the group name on the left column that groups a few functions, like rename, delete and download.


Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

lucavallerini avatar Feb 25 '19 17:02 lucavallerini

GitMate.io thinks possibly related issues are https://github.com/nextcloud/contacts/issues/563 (Create a group from the group/left pane), https://github.com/nextcloud/contacts/issues/537 (Neue Gruppe / new group - Gruppe umbenennen / rename group), https://github.com/nextcloud/contacts/issues/444 ("groupname (new group)" stored), https://github.com/nextcloud/contacts/issues/212 (Ability to share groups), and https://github.com/nextcloud/contacts/issues/609 (GROUP vcard support).

nextcloud-bot avatar Feb 25 '19 17:02 nextcloud-bot

Unfortunately renaming a group will not come before #213 :/

skjnldsv avatar Mar 04 '19 12:03 skjnldsv

@skjnldsv, given the latest developments on #1175, would it be possible to solve this issue in the next major milestone, too?

nunesgh avatar Oct 31 '20 20:10 nunesgh

@nunesgh we're getting close to batch-processing, but it require some tiem to work on, time that I don't have at the moment :(

skjnldsv avatar Nov 01 '20 15:11 skjnldsv

@skjnldsv I understand! Thank you for replying!

nunesgh avatar Nov 01 '20 21:11 nunesgh

Any update on when groups can be renamed? Is there any occ workaround that can be done from the Linux command line to rename groups?

serversci avatar Feb 13 '21 19:02 serversci

Any update on when groups can be renamed? Is there any occ workaround that can be done from the Linux command line to rename groups?

+1

Diskoteket avatar Feb 16 '21 19:02 Diskoteket

Is there any occ workaround

No, there is not, sorry

skjnldsv avatar Feb 17 '21 07:02 skjnldsv

Pushing this issue, any news?

BentHaase avatar Apr 27 '21 08:04 BentHaase

How much work is it to implement this feature?

Perhaps we can create some financial incentive?

I'm quite surprised that this issue still is open. How do people use the group feature? It seems quite important to me, to be able to change and delete a group...

At the moment (3.0.3) the only way to "rename" a group is to add each contact one by one to a new group.

Which would cause you to lose all settings and automations related to the original group, like custom access rights, automatic user assignment during registration and group folders assignments. Not a viable workaround for any real-world scenario sadly.

mrzool avatar Aug 24 '21 12:08 mrzool

I really need to change group names. When can we expect to see this feature in the release? Thanks.

readonly24 avatar Sep 30 '21 06:09 readonly24

This should be regarded a basic feature. It is simply annoying not to be able to rename or delete a group. C'mon, let reality catch up....

flederwiesel avatar Oct 03 '21 16:10 flederwiesel

100% agree! I want to change one of my group names

nikrozman21 avatar Oct 10 '21 13:10 nikrozman21

What is the status on this issue ?

BFOX12 avatar Jan 12 '22 01:01 BFOX12

And why is this related to issue #213? Looks like that issue is for Contacts and CardDAV, but this issue is for Nextcloud Groups for users. I have not looked at the code yet but would have thought these were separate items. Thanks for the hard work and any feedback on this item

OneAceGuy avatar Jan 13 '22 14:01 OneAceGuy

I'd like to contribute to this apps but I'm not a PHP dev just and IT admin, so I have built a script providing this feature by updating the Database directly, until someone will develop this feature in the app.

  • The script must run on the server hosting the DB
  • The script has been written for MariaDB servers, and 'd need adjustments for Postgrey or other DB servers
  • Feel free to update to fit your own need
  • Despite I have tested the script to cover all scenarios, it could still exist bugs in, so Keep in mind that working in the DB directly is at your own risks rename_ContactsGroup_DB.sh.gz

forsequans avatar Jan 21 '22 16:01 forsequans

@itsequans

I have built a script providing this feature by updating the Database directly,

I think the risky part is that some plugins may reference a group by name, and mysql doesn't seem to have FOREIGN KEYs around to follow that backwards.

grinapo avatar Jan 26 '22 14:01 grinapo

There is a Table oc_groups and the field displayname. I have renamed the appropriate entry. Seems to work. But I can not test everything. Maybe one problem is the field gid with the old name that you can not change. You can not use this name in the future. So, at your own risk ;-))))

C64Axel avatar Feb 22 '22 15:02 C64Axel

Just ran into this issue too, so +1

brendan-pike avatar Mar 18 '22 06:03 brendan-pike

Just add your :+1: to the request and avoid causing a notification for everyone :v:

ChristophWurst avatar Mar 18 '22 07:03 ChristophWurst

Version 23.0.3, still not having it. group name cannot be changed

lawipac avatar Aug 06 '22 11:08 lawipac

I have the same issue. Renaming contact groups saved in oc_cards (not oc_groups) seems like a possible and fast task. If possible I would like to somehow incentivize advancement on this issue.

In the meantime @itsequans script worked flawlessly (thank you), although it is a crude solution to have to manually edit the SQL database.

Lipovlan avatar Aug 17 '22 10:08 Lipovlan

I would also support the develoment of this long long missing "basic" feauture!

blitzdesigner avatar Sep 26 '22 14:09 blitzdesigner

Hello,

Any news about this basic feature ?

chatlumo avatar Nov 10 '22 10:11 chatlumo

From what I see in the database, there is not an "id" (Long, auto-id), but everything is linked via the "gid" (String). So the account-IDs (visible in frontend) is used to interlink the tables! This answer sums it up: https://stackoverflow.com/a/14897642

It would have been an easy thing to do when the database was designed with auto-IDs.

What needs to be done is to totally redesign the database. This has a lot of implications, like many plugins not working anymore. The database also needs to prevent old apps from accidentally breaking the tables. So the total operation is huge!

But still - I see no reason to postpone this further. Maintenance costs for both NC and all apps will go up, if not fixed.

VincentSC avatar Apr 20 '23 17:04 VincentSC

Now I'm also starting to miss this feature. I've groups for the classes in school of our children and every summer I will have to move a lot of contacts around.

oktayacikalin avatar Jan 11 '24 21:01 oktayacikalin

grafik

I think it is already possible with our Version 26.0.5

shu0406 avatar Feb 15 '24 12:02 shu0406

Which version does your contacts app have? Or which app is that? I've contacts version 5.5.1 installed in Nextcloud 28.0.2 stable.

oktayacikalin avatar Feb 15 '24 12:02 oktayacikalin

Just look at the url of a group - the group-name is shown at the end. The groups can superficially be relabelled, but will keep the same name. So the group with url <domain>/settings/users/Squares can be relabelled to "Circles" but they will remain named "Squares" forever.

As a result of this problem (which I technically explained above), we have for example two groups named employees and Employees, which both are labelled "Employees". Yup, it's case-sensitive in the url! nextcloud-employees

So want to rename a group? First, create a new group with the right name. Can be done via the web-interface or occ group:add. Then run occ group:list to get the members of each group. Then add each user to the new group with occ group:adduser. Finally check if the members of the first group are all in the new group, to delete the first one. I just found https://help.nextcloud.com/t/moving-users-from-one-group-to-another-or-renaming-group/127584 which suggested the same.

Or a bash-script rename-group.sh - anyone? :) One hint that solves half the work: get members of a group called "group": occ group:list --output json | jq '.group' | jq ., and use occ group:list --output json | jq '.group' | jq -c '.[]'` to list just the names, to use them in bash.

VincentSC avatar Feb 15 '24 14:02 VincentSC