Versions Compared

Key

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

...

Property

Type

Description

id

uuid

seasonId

string

Season

name

string

With i18n

code

string

Usually the rule number or an accumulation code

type

enum

Definite or Indefinite

minimumGames

number

Default value for suspension requiredGames, minimum enforced while a suspension is being appealed

officeId

number

1:1 with the rulebook office

externalId

uuid

For syncing with Spordle ID

...

Property

Type

Description

id

uuid

gameId

id

Game the suspension originated in

participantId

id

Participant that was suspended

teamId

id

Team that the participant is suspended in

positionGroup

enum

Position that this participant was suspended in. Player, Staff

code

enum

Deprecated, replaced by sanctionId

sanctionId

id

Sanction that was determined by the rulebook sanction rules

penaltyId

id

Penalty that resulted in the suspension

type

enum

Definite or Indefinite. This is required to be the same as the sanction type.

minimumGames

number

Minimum number of games required for this suspension

Optional when indefinite. Set by system.

requiredGames

number

Number of games required to complete the suspension.

Optional when Indefinite. Required to be >= sanction. minimumGames

expiryDate

date

Optional - Date when the suspension will expire if the games requirement isn’t met

status

enum

Pending, Appealed, Active, Completed, Cancelled, Expired

externalId

uuid

For syncing with Spordle ID

...

  • 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

...