# Change task management

The change task management delivers the functionality to ...

- **define** a change task,
- **monitor** live change behavior during the time period of the change task(s) and
- **document** the correct implementation of all planned changes after completion of the change period of the change task.

Based on Versio.io Asset &amp; Configuration Item Inventory.

## Entities

A **change task** defines for which instances a change is planned at a specific time or recurring date. A **change task period** is created for each time or recurring date period of a change task. The complete documentation of a change task is recorded in the change task period.

```
%%{init: {
  "theme": "base",
  "themeVariables": {
    "primaryColor": "#FFF",
    "primaryBorderColor": "#003964",
    "primaryTextColor": "#003964",
    "lineColor": "#003964"
  }
}}%%
flowchart LR
    CT["Change task"]
    CTP["Change task period"]

    CT -->|"1..*"| CTP
```

## Process

- Define change task
- Monitor change task

  - Optionally review the result of a change task period
  - Documentation

## Best practices

How should I interpret the change task period result?

## Workflow &amp; states

### Change task

Various state changes are possible for the **change task**.

```
%%{init: {
  "theme": "base",
  "themeVariables": {
    "primaryColor": "#fffefe",
    "primaryBorderColor": "#003964",
    "primaryTextColor": "#003964",
    "lineColor": "#003964"
  }
}}%%
stateDiagram-v2

    [*] --> Edit

    state "Create and edit a new <br/> change task ticket" as Edit
    state "Change task is <br/>ready for approval" as ToApproval
    state "Change task <br/>is in execution mode" as Active
    state "Change task <br/>execution is completed" as Completed

    Edit --> ToApproval : For approval

    ToApproval --> Edit : Not approved <br/>(send mail to author)
    ToApproval --> Active : Approved

    Active --> Completed : Automatic <br/>(end time reached)
    Active --> Completed : Manual <br/>(user stops execution)

    Completed --> [*] : Delete change <br/>task <br/>(including periods)
    Completed --> [*] : Hold for reports <br/>and audits
```

*Illustration: Possible change task state transitions*

`edit` (automatic)

- users can edit the configurations

`edit` → `toApproval` (manual)

- creation of first **change task period** (preview-init)

`toApproval` → `edit` (manual)

- delete all **change task periods**

`toApproval` → `active` (manual)

- recreation of first **change task period** (init)

`toApproval` → `active` (manual/automatic)

- no more **change task periods** will be created

### Change task period

```
%%{init: {
  "theme": "base",
  "themeVariables": {
    "primaryColor": "#FFF",
    "primaryBorderColor": "#003964",
    "primaryTextColor": "#003964",
    "lineColor": "#003964"
  }
}}%%
stateDiagram-v2

    [*] --> Preview : Creates if the change task<br/>goes to state "toApproval" or<br/>a previous change task period<br/>is finished

    state "Determine instances<br/>for which a change<br/>is expected in the<br/>change task period" as Preview

    state "Planned changes<br/>are monitored<br/>and documented" as Started

    state "Finishing change<br/>documentation" as Ended

    state "Active confirmation<br/>by the purchaser" as ToReview

    state "Change task period<br/>processing completed" as Finished

    Preview --> Started : Start time of the<br/>change period reached

    Started --> Ended : End time of the<br/>change period reached

    Ended --> ToReview : Not all planned<br/>changes have been<br/>executed

    Ended --> Finished : All planned<br/>changes are executed<br/>as planned

    ToReview --> Finished : Reviewed

    Finished --> [*]
```

The following states exist for the **change task period**: `preview` → `started` → `ended` → `reviewed`. Except for the manual state change to `reviewed`, these states are automated and cannot be influenced by the user.

`preview` (automatic)

- create preview-init
- periodic recreation of preview-init

`preview` → `started` (automatic)

- init
- process changes

`started` → `ended` (automatic)

- finalize

`ended` → `toReview` (manual)

- update reviewed user and time

*Illustration: Possible change task period state transitions*
