Departments and Sites

Departments

What. A tree of departments inside the org. Each has a code, name, head, members, and may own processes and documents. Where. /departments.

List page (tree view)

The departments page is a hierarchical tree. Click a node to expand its children. Each row shows code, name, head avatar, and counts of processes

Top-right buttons:

Detail page (5 tabs)

/departments/<id> has tabs:

Plus a Members (n) section on the Overview tab with an Add member button (admin / dept head only).

Adding a member

  1. Open the department detail.
  2. Click Add member.
  3. The dialog opens. Type a name or email - the field autocompletes against existing org members.
  4. Pick Role (Member, Lead, Reviewer, etc.).
  5. Click Add member.

Changing the head

  1. On Overview, click Change head.
  2. Pick a member from the dropdown (must already be a member of the department).
  3. Confirm. The previous head is demoted to a regular member; the new head is promoted.

Approval impact. When a department's head changes, any pending approvals where the department head is a step do not re-target - the already-materialized approval row keeps the original approver. New submissions get the new head.

Sub-departments

A department's parent_id references another department. The closure table department_ancestors is maintained automatically - that's what the cross-org-leak fix relies on.

Test it

Sites

What. Physical locations or business units. Sites can scope risks and audits. Where. /sites.

List + detail

The list shows site name, address, type. Click a row to open the editor where you can edit metadata.

Sites are referenced by:

Sites do not currently have approval flows or members.

Test it

← Back to CompStack