Project

General

Profile

Actions

roos-fs tasks #124

open

Create a state machine + sertain validation rules for the Tasks

Added by Vadim Pariev 11 months ago. Updated 5 days ago.

Status:
Closed
Priority:
Normal
Start date:
06/12/2025
Due date:
% Done:

0%

Estimated time:
16:00 h

Description

User story

As a system user (administrator), I want the service object to follow a clearly defined state machine, So that each stage of the task (from creation to completion or cancellation) follows business logic, validation rules, and restrictions).

State Machine Flow & Requirements
Statuses

  • Created
  • Opened
  • In Progress
  • Completed
  • Cancelled → By customer / Internally
  • Deleted (only possible from Created)

Transitions & Conditions
TASK → Created

Initial state when a new task is created.
Can be deleted in this state only.

Created → Opened

Triggered manually by a button.
Triggered automatically with the service if created in the "created" status of the service. Event - user changed the status of the Service to Opened

Opened → In Progress

Triggered manually.
System must record who triggered the transition.

In Progress → Completed

Triggered manually.
Optional note field becomes visible and can be used to describe what was done.

Created, Opened, In Progress → Cancelled

Triggered manually.
Requires selection of one of the two reasons:
--By customer
--Internally

Documentation for cancellation reasoning is mandatory.

Acceptance Criteria
State Machine

  • Users can transition between statuses only as outlined above.
  • Status changes must be explicit and user-triggered via buttons.

Deletion

  • Deletion is only permitted in the Created state.

Completion

  • Task must include an optional field for notes describing what was done.

Cancellation

  • When cancelling a task, the user must:
    -- Choose the cancellation reason (By customer or Internally).
    -- Provide a written explanation in a mandatory documentation field.

Validation

  • The system must ensure that tasks in Completed status cannot be edited or deleted.

Logging

Each state transition must be logged with:

  • Timestamp
  • Triggering user
  • Any notes or cancellation documentation
Actions

Also available in: Atom PDF