# Warning workflow

## Warning statuses

### Warning created

When a warning gets created punishment actions of the warning get executed.\
At this point the warning is in a state where it is counted during [threshold calculation](https://wiki.staffplusplus.org/features/thresholds#score-calculation-example).\
A player can [appeal](https://wiki.staffplusplus.org/features/warnings/appealing) the warning, a staff member can manually expire the warning or even delete the warning

### Warning [appealed](https://wiki.staffplusplus.org/features/warnings/appealing)

When a warning gets appealed a staff member has the ability to approve or reject the appeal.\
Once an [appeal is rejected](https://wiki.staffplusplus.org/features/appealing#staff-manage-appeal) the player can no longer appeal it. When an appeal is approved, [rollback actions](https://wiki.staffplusplus.org/features/warnings/actions-punishments) are triggered and the warning is marked appeal approved. Once an [appeal is approved](https://wiki.staffplusplus.org/features/appealing#staff-manage-appeal) it is like the warning never existed. It does not get counted when doing [threshold calculations](https://wiki.staffplusplus.org/features/thresholds#score-calculation-example) and won't show up in the [infractions GUI](https://wiki.staffplusplus.org/features/infractions). However the warning does not get deleted, this makes sure we can keep a history of the warning and appeal reasons.

### Warning expired

Warnings can expire after a configured amount of time. Or manually by a staff member. When a warning is expired the punishments do **not** get [rollbacked](https://wiki.staffplusplus.org/features/warnings/actions-punishments). The only real reason for warning expiration is to make sure this warning no longer gets counted when doing [threshold calculations](https://wiki.staffplusplus.org/features/thresholds#score-calculation-example). It's a way to ensure warnings won't be held against the player forever.

Notice that a player can still appeal this warning. The reason a player might want to do this is if feels the warning was incorrectly given and although it's expired he still received the [punishment](https://wiki.staffplusplus.org/features/warnings/actions-punishments). So by appealing he asks to rollback his punishment.

### Warning deleted

A staff member can choose to delete a warning completely. This action can always be taken no matter what status the warning is in. When a warning gets deleted, [rollback actions](https://wiki.staffplusplus.org/features/warnings/actions-punishments) are triggered and the warning is removed from the database. All history of the warning is gone.\
In general you should only delete a warning if there was actually a mistake made. In most cases you can use the appeal system to [rollback warnings](https://wiki.staffplusplus.org/features/warnings/actions-punishments) in a clean way.

![Warnings workflow](https://3621425798-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MPQohtcLxhXAvpSXOMt%2F-MUGIn0it8Zg_Vo2420g%2F-MUGZrqJx43Ml5id4iGe%2Fwarnings_workflow.png?alt=media\&token=d9f992b6-7b77-47f6-b62a-95f23077e136)
