> ## Documentation Index
> Fetch the complete documentation index at: https://docs.encoreos.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Change Templates

> Manage and create reusable change-request templates with default risk levels, categories, plans, and auto-approve settings.

The Change Templates screen lists and manages reusable templates for IT change requests and is accessible at `/it/changes/templates`.

## Overview

The Change Templates page loads all templates via `useChangeTemplates` and displays them in a data table with columns for name (linked to detail page), description, category, default risk level badge, auto-approve badge (Yes/No), and active/inactive status badge. A trash icon on each row opens a confirmation alert dialog before deleting the template. A **New Template** button links to `/it/changes/templates/new` to create a new template.

## Who it's for

Requires `IT_PERMISSIONS.VIEW` (outer `ITViewGuard`). No additional per-route permission gate.

## Before you start

* You must hold `IT_PERMISSIONS.VIEW` to access this screen.

## Steps

<Steps>
  <Step title="Open Change Templates">
    Navigate to `/it/changes/templates`. The table lists all available templates.
  </Step>

  <Step title="View or edit a template">
    Click the template name or the edit icon to navigate to the template detail page at `/it/changes/templates/:id`.
  </Step>

  <Step title="Create a new template">
    Click **New Template** to go to `/it/changes/templates/new` and fill in the template form.
  </Step>

  <Step title="Delete a template">
    Click the trash icon on any row and confirm deletion in the alert dialog.
  </Step>
</Steps>

## Key concepts

* **default\_risk\_level** — The risk level pre-populated when a change request is created from this template.
* **auto\_approve** — Boolean flag; SME should confirm enforcement behavior in the approval workflow.
* **is\_active** — Controls whether the template appears as an option when creating change requests.

## Viewing a change template

The Change Template Details page (`/it/changes/templates/:id`) loads `ITChangeTemplateDetailPage` and manages a single change management template. This route is separate from provisioning templates (which live at `/it/jml/templates/:id`).

Permission required: `IT_PERMISSIONS.VIEW` (`it.view`) via the module-level `ITViewGuard`. No additional per-route gate.

1. From the Change Templates list at `/it/changes/templates`, click a template name or the edit icon.
2. Edit the template name, description, category, default risk level, auto-approve flag, and active status as needed.
3. Update the default implementation plan, rollback plan, and test plan.
4. Save changes to update the template in place.

## Creating a change template

The New Change Template page (`/it/changes/templates/new`) provides a form for creating reusable IT change request templates. Templates pre-populate the category, implementation plan, rollback plan, test plan, and default risk level when used in the New Change Request form.

The page uses `useChangeTemplateMutations` for creation. The form collects: `name` (required), `description`, `category`, `default_risk_level` (`low`, `medium`, `high`), `auto_approve` (boolean toggle), `is_active` (boolean toggle, default true), `default_implementation_plan`, `default_rollback_plan`, and `default_test_plan`. On success, navigates to `/it/changes/templates`.

**Categories** (code-defined): `infrastructure`, `application`, `security`, `network`, `database`, `other`.

No explicit secondary permission gate at the route level beyond the outer `ITViewGuard` (`it.view`). Managing templates requires `it.changes.manage`.

Before you start: hold the appropriate changes management permission (`it.changes.manage`) and define a standard implementation and rollback plan before creating the template.

1. Navigate to `/it/changes/templates/new` or click **New Template** from the Change Templates list.
2. Provide a descriptive name (e.g., "Standard Server Patch") and select the appropriate category.
3. Choose the default risk level (`low`, `medium`, `high`) that will be pre-selected when this template is used.
4. Toggle **Auto-Approve** on if standard changes using this template should bypass manual approval.
5. Fill in the default Implementation Plan, Rollback Plan, and Test Plan. These will pre-populate the corresponding fields in new change requests that use this template.
6. Click **Create Template**. On success you are redirected to `/it/changes/templates`.

| Concept        | Description                                                                                        |
| -------------- | -------------------------------------------------------------------------------------------------- |
| `auto_approve` | When enabled, change requests of type `standard` using this template may bypass the approval queue |
| `is_active`    | Inactive templates do not appear in the template selector on new change request forms              |
| Default plans  | Pre-filled content that users can edit when creating a change request from this template           |

## Related

<Columns cols={2}>
  <Card title="IT Service Management" icon="headset" href="/it/overview">
    IT Service Management overview.
  </Card>

  <Card title="Governance & parity" icon="scale-balanced" href="/governance/index">
    Documentation coverage and governance.
  </Card>
</Columns>

<Note>
  This page documents shipped product behavior. It is not medical, legal, or
  billing advice. Verify against your organization's policies and applicable
  regulations before using it for clinical, compliance, or billing decisions.
  Protected health information (PHI) shown in the product is governed by your
  tenant's access controls and is never exposed in this documentation.
</Note>

<Accordion title="Documentation sources">
  * src/routes/it.tsx
  * src/cores/it/pages/changes/ChangeTemplatesPage.tsx
  * src/cores/it/pages/changes/NewChangeTemplatePage.tsx
  * src/cores/it/hooks/useChangeTemplateMutations.ts
  * src/cores/it/types/change-management.ts
</Accordion>
