Skip to content

NMS-20107: versioned group management API and PrimeVue Manage Groups page - #8714

Open
joseanesONMS wants to merge 6 commits into
developfrom
jira/NMS-20107-manage-groups-primevue
Open

NMS-20107: versioned group management API and PrimeVue Manage Groups page#8714
joseanesONMS wants to merge 6 commits into
developfrom
jira/NMS-20107-manage-groups-primevue

Conversation

@joseanesONMS

Copy link
Copy Markdown

NMS-20107: a versioned group management API (/api/v2/groups) and a PrimeVue Manage Groups page that is a straight visualization of it; independent companion to #8698. groups.xml stays the system of record via the existing GroupManager, with member order (the notification escalation order) and default-map preserved end to end.

  • Endpoints: list/get/create/update/rename/delete, admin-only via new Spring Security rules and in-code checks.
  • The Admin group cannot be deleted or renamed, enforced server-side (the legacy page only hid the buttons).
  • Renames follow the on-call roles' membership-group references in the same file write, deletes are rejected while a role still references the group, and both go through GroupService so the DB category authorizations are migrated or cleared as the legacy page did.
  • Overnight duty schedules are rejected for new entries because the runtime never matches them; stored strings, hand-edited comments and stale members are grandfathered so files never become uneditable.
  • The page validates fields inline, shows API rejections inside the dialogs, and includes a collapsed in-context help panel.
  • 19 integration tests (mock managers, groups.xml never touched) plus Vitest store/dialog tests; verified end to end including hand-editing groups.xml between API calls.

…page

Adds /api/v2/groups (list/get/create/update, rename, delete), admin-only
via Spring Security rules plus in-code checks, wrapping GroupManager so
groups.xml stays the system of record. The member list order is
preserved end to end — it drives the notification escalation order —
and fields the API does not expose (default-map) survive updates.
Requests are validated up front (name and comment markup, members must
exist, duty schedule grammar with overnight ranges legal) and applied to
a detached copy, so rejected requests leave no partial state. Unlike the
legacy page, which only hid the buttons, the Admin group is protected
server-side, renames follow the on-call roles' membership-group
references, and deletes are rejected while roles still reference the
group instead of leaving dangling references.

The Manage Groups page (ui/#/admin/groups) visualizes the API: groups
table, editor with an ordered member list (move up/down), rename and
delete dialogs with the system group disabled. The menu entry now points
at the new page. 13 integration tests and 8 store tests.
Fixes from self-review. Duty schedules with begin after end are rejected
for new entries — DutySchedule.isInSchedule compares within one calendar
day, so an overnight range never matches and would silently take the
group off duty; strings already stored on the record keep round-tripping
so hand-edited files never make a group uneditable. Delete and rename go
through GroupService so the DB category authorizations are cleared and
migrated as the legacy page did (deleting a group otherwise leaked its
authorizations to a future group reusing the name). Renames re-point the
on-call roles in memory first, so the rename's single save persists
groups and roles together, with the role changes reverted on failure.
Both v2 services now serialize on a shared monitor because user
mutations cascade into GroupManager. Dot-segment names are rejected, and
clearing the comments field works (an explicit empty string clears; an
omitted key still preserves).

Adds a collapsed "?" help panel explaining what groups are for and how
to use the page, including the escalation-order and rename semantics.
… dialogs

Same treatment as the users page: group mutations return the server's error
message and the editor/rename dialogs show it inline instead of relying on a
toast hidden behind the modal; the group name and comments fields get live
client-side checks mirroring the server rules, and groups with names the
security filter cannot address in a URL path show a file-managed note in
place of row actions.
A hand-edited groups.xml can reference a user that no longer exists; since
the editor always sends the full member list, the unknown-user check made
such groups uneditable. Members already stored on the group now skip the
existence check, matching the duty-schedule and on-call-schedule handling;
members new to a request must still resolve to a real user.
The name and comments regexes now scan for forbidden characters instead of
full-string matches a newline could bypass. Hand-edited comments containing
markup characters are grandfathered while unchanged — server-side and in
the editor — so such groups stay editable; changed comments are still
validated. The rename rollback no longer re-points on-call roles in memory
when the rename already persisted to groups.xml (only the DB category
migration failed), which would have diverged memory from the file; that
case now reports the partial failure explicitly.
@joseanesONMS

Copy link
Copy Markdown
Author

@marshallmassengill could you take a review pass when you get a chance?

@joseanesONMS
joseanesONMS requested a review from synqotik July 30, 2026 20:51
…uHeaderIT

The menu entry now lands on the Vue page, so the smoke test waits for its
page title instead of the legacy JSP breadcrumb.
@joseanesONMS
joseanesONMS force-pushed the jira/NMS-20107-manage-groups-primevue branch from deec164 to 02faec4 Compare July 31, 2026 01:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant