mirror of
https://github.com/fleetdm/fleet
synced 2026-05-23 08:58:41 +00:00
for #27701 # Checklist for submitter - [X] Changes file added for user-visible changes in `changes/`, `orbit/changes/` or `ee/fleetd-chrome/changes`. See [Changes files](https://github.com/fleetdm/fleet/blob/main/docs/Contributing/Committing-Changes.md#changes-files) for more information. - [X] Manual QA for all new/changed functionality ## Details This PR fixes an issue where adding or removing a single host on a manual label in the UI had unexpected results when that host's serial number was not unique. When adding the host, all other hosts with the same serial # would be added. When removing the host, _no_ hosts would be removed unless _all_ the hosts with the matching serial # were removed. The fix here is to introduce a new API param `host_ids` which allows sending explicit Fleet host IDs to the add/update label APIs. These are guaranteed to be unique. ## Testing * Added new automated tests for the `NewLabel` and `ModifyLabel` services * Manually tested adding and modifying labels using hosts with duplicate serials (I manually updated serials in my local db to get duplicates) ## Notes * The existing `hosts` param is preserved (and tested) since API-only users may rely on it. * A separate API docs PR will be opened. |
||
|---|---|---|
| .. | ||
| entities | ||
| mock_service | ||
| index.ts | ||