Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Table of Contents

...

Property

Type

Description

id

uuid

Automatically generated, which will be associated to the suspension

name

string

Description of the suspension sanction rule to show with suspensions

positionpositionsstring

enum[]

Optional - Player or Coach.TBD - This is to handle coach suspensions based on player penaltiesApplicable to players or coaches

Penalty matching

matchers[]

object[]

Types of penalties

name

string

Name of the penalty to match

code

string

Optional - code of the penalty to match

injury

boolean

Optional - accounts for if there’s a linked incident report with an injury or not

Accumulation

order

number

Accumulation precedence order

resetAccumulation

number

Optional - number of infractions to reset the count after

accumulations[]

object[]

Total number of infractions required to be accumulated

total

number

Optional? - Total number of infractions

sanctionId

uuid

Resulting sanction

This could potentially be multiple..? 🚩

...

  • When the game is completed (or certified, depending on settings), get all parent rulebooks of the schedule office

    • Cancel out sanctions in parent rulebooks that have a matching sanction in a child rulebook by matchers

  • Determine matching sanction rule for each player

    • Each penalty only results in one suspension per game

      • Hockey has some exceptions

    • Determine sanction rules by matching the strictest penalty name/code match and order

    • TODO: indirect red will affect yellow here somehow 🚩

  • Get all past penalties and suspensions of all suspend-able players in the same season

    • In soccer, limit both to same office

  • Determine the sanction based on the accumulation rules

    • accumulations[] is ordered, find the matching total based on the number of penalties incurred in past games and current. Account for reset count.

  • If there is an expiry ratio defined, calculate the expiry based on the number of days

    • If the expiry falls within a break, extend it by the number of days within that break

  • When creating the suspension, send a notification to the player, team and offices

...