Skip to content

fix(teams): restore selectedGroup on circle/user_group routes to fix "Unable to create contact" error (#5257)#5377

Open
pallavibakale wants to merge 3 commits into
nextcloud:mainfrom
pallavibakale:fix/teams-new-contact-bug-5257
Open

fix(teams): restore selectedGroup on circle/user_group routes to fix "Unable to create contact" error (#5257)#5377
pallavibakale wants to merge 3 commits into
nextcloud:mainfrom
pallavibakale:fix/teams-new-contact-bug-5257

Conversation

@pallavibakale

Copy link
Copy Markdown

fix(teams): fix "Unable to create contact" error when a team is selected

RouterMixin.selectedGroup read only from $route.params.selectedGroup, which is absent on circle and user_group routes after a routing refactor that moved them to dedicated paths. This caused selectedGroup to be undefined on team routes, breaking isCirclesView (always false) and making newContact() fall through to a router.push with a missing required param.

Fix RouterMixin to derive selectedGroup from the route name when the param is absent. Update newContact() to check selectedCircle directly for the circle-specific event, extend the group-exclusion list to cover ROUTE_CIRCLE and ROUTE_USER_GROUP, and fall back to GROUP_ALL_CONTACTS when navigating from a user group view.

Fixes #5257

@pallavibakale pallavibakale changed the title fix(teams): restore selectedGroup on circle/user_group routes to fix … fix(teams): restore selectedGroup on circle/user_group routes to fix Unable to create contact" error (#5257) Jun 8, 2026
@pallavibakale pallavibakale changed the title fix(teams): restore selectedGroup on circle/user_group routes to fix Unable to create contact" error (#5257) fix(teams): restore selectedGroup on circle/user_group routes to fix "Unable to create contact" error (#5257) Jun 8, 2026
@hamza221 hamza221 added the 3. to review Waiting for reviews label Jun 11, 2026

@hamza221 hamza221 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hello,
Same for this PR please run npm ci then npm run lint:fix then push again.
DCO is also failing please also run:

  • In your local branch, run: git rebase HEAD~1 --signoff
  • Force push your changes to overwrite the branch: git push --force-with-lease origin [branch]

@codecov

codecov Bot commented Jun 11, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 168 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/views/Contacts.vue 0.00% 155 Missing ⚠️
src/mixins/RouterMixin.js 0.00% 11 Missing and 2 partials ⚠️

📢 Thoughts on this report? Let us know!

…"Unable to create contact" error (nextcloud#5257)

Signed-off-by: pallavibakale <pallavibakale09@gmail.com>
Signed-off-by: pallavibakale <pallavibakale09@gmail.com>
Signe-off-by: pallavibakale <pallavibakale09@gmail.com>
Signed-off-by: pallavibakale <pallavibakale09@gmail.com>
@pallavibakale pallavibakale force-pushed the fix/teams-new-contact-bug-5257 branch from d5a2c09 to e0519ce Compare June 11, 2026 15:56
@pallavibakale

Copy link
Copy Markdown
Author

Hello, Same for this PR please run npm ci then npm run lint:fix then push again. DCO is also failing please also run:

  • In your local branch, run: git rebase HEAD~1 --signoff
  • Force push your changes to overwrite the branch: git push --force-with-lease origin [branch]

Hello Hamza, the linting issue is fixed and DCO is passed.
I'll make sure to sign-off my commits moving forward.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

3. to review Waiting for reviews

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cannot add new contact when team is selected

2 participants