nextcloud / nextcloud/groupfolders
Duplicate teams in team folders team selection dialog
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 343
- Forks
- 106
- Avg merge
- 2d 3h
- Merged PRs (30d)
- 34
Description
How to use GitHub
- Please use the 👍 reaction to show that you are affected by the same issue.
- Please don't comment if you have no relevant information to add. It's just extra noise for everyone subscribed to this issue.
- Subscribe to receive notifications on status change and new comments.
Steps to reproduce
- Log in as
admin - Create a few teams as admin
- Set the sole owner of a team to another team
- Navigate to the team folders administration and try to set this team for a team folder
Expected behaviour
Duplicate entries will show (sometimes even more than two entries, couldn't figure out a pattern)
The GET request to https://[host]/apps/groupfolders/delegation/circles also shows duplicate entries:
{
"ocs": {
"meta": {
"status": "ok",
"statuscode": 100,
"message": "OK",
"totalitems": "",
"itemsperpage": ""
},
"data": [
{
"singleId": "IbNdUdlXdIAbzzuZo2ILHActG8QaMkk",
"displayName": "foo"
},
{
"singleId": "IbNdUdlXdIAbzzuZo2ILHActG8QaMkk",
"displayName": "foo"
},
{
"singleId": "fJnwlTYjmxuJCPJQYG4HoFOTYxylgC7",
"displayName": "bar"
},
{
"singleId": "fJnwlTYjmxuJCPJQYG4HoFOTYxylgC7",
"displayName": "bar"
},
[...]
]
}
}
Actual behaviour
Each team should only show once. The quick fix would probably be to remove duplicates here: https://github.com/nextcloud/groupfolders/blob/master/lib/Controller/DelegationController.php#L105
But it could also be that the original issue belongs to https://github.com/nextcloud/circles/
Server configuration
Database: PostgreSQL 17.6
PHP version: 8.3.25
Nextcloud version: 31.0.8
Team folders version: 19.1.3
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start in lib/Controller/DelegationController.php around line 105 and inspect the GET /apps/groupfolders/delegation/circles response. Reproduce the team-folder selection flow with a team whose sole owner is another team, then determine whether duplicates originate in groupfolders or circles. Done means each team appears once in the dialog and the endpoint data contains no duplicate entries.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- api, backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100