Skip to content

Groups and devices - while adding device to group is change only the origin name and not the group itself and during that we can use device #409

Description

@asafasa2

When an admin assigns a device to a bookable origin group via the API (PUT /api/v1/devices/{serial}/groups/{id}), only the groupOrigin field on the device is updated. The device's current active group (group.name) remains unchanged (stays as Common), making the device invisible and inaccessible to users who belong to the new origin group.
Expected behavior
When a device is assigned to a bookable origin group, the device's current group should immediately reflect the new origin group, making it visible and accessible to all users who are members of that group — without any additional steps required.
Actual behavior

groupOrigin is updated correctly ✅
group.name (current active group) remains Common ❌
Users in the new origin group cannot see or use the device ❌

Steps to reproduce

Have a device currently assigned to Common (root standard group)
Call PUT /api/v1/devices/{serial}/groups/{bookableGroupId} as admin
Check the device in the UI — Group Origin shows the new group correctly
Check Group Name — still shows Common
Users of the new origin group cannot see the device

Workaround (painful)
The only current workaround to force the current group to update is:

Create a temporary transient group
Add the device to the transient group
Wait for the current group to update
Delete the temporary transient group
Device current group finally reflects the origin group

This is not acceptable for production use, especially when managing devices programmatically via automation (e.g. n8n workflows that auto-assign devices to team groups on provider connect).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions