...
Property | Type | Description |
---|---|---|
id | uuid | |
sanctionId | id | |
infractionId | id |
Settings Models
...
OfficeBreak
Required to define breaks when calculating the suspension expiry date for the season. Could also be used for the scheduler.
Property | Type | Description |
---|---|---|
id | uuid | |
seasonId | enum | |
type | enum | Sanctions, Scheduling |
startDate | date | |
endDate | date | |
officeId | id | |
categoryIds | id[] | Optionally specify which categories it applies to |
SanctionRatio
BC Hockey defines a ratio generally, not per game, so it might be better to do the same. When games is undefined, it will serve as the default case and serve as a n:m ratio
...
Office settings that affect general suspension behaviour
Property | Type | Description |
---|---|---|
endGameSomethingendGameDuration | number | Number of minutes before the end of the game when Hockey Canada defines this as 10 minutes; QC defines this as 5 minutes |
suspensionActivation | enum |
...
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 | sanctionId | id | Sanction that was determined by the rulebook sanction rules |
penaltyId | id | Penalty that resulted in the suspension | |||
positionGroup | enum | Position that this participant was suspended in. Player, Staff | |||
sanctionId | id | Sanction that was determined by the rulebook sanction rules | |||
durationType | enum | Definite or Indefinite. This is required to be the same as the sanction duration | |||
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 >= minimumGamesduration type, but may be set with it | |||
expiry | 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 | |||
Legacy suspension options (deprecated) | |||||
| enum | Deprecated, replaced by sanctionId |
...
Implementation
Unhardcoding
Status | ||||
---|---|---|---|---|
|
Handle indefinite and expiry dates
Jira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-646
Replace code with sanctions
Jira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-665
...
If an official has any active suspension, they should be flagged as Suspended
Status colour Green title COMPLETE
This will be limited to Play suspensions as querying ID will absolutely kill performanceJira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-655
Completion
Status | ||||
---|---|---|---|---|
|
If the suspension type is Indefinite, the suspension can never automatically be completed
Status colour Green title COMPLETE Jira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-646
If there is an expiry date, the suspension is considered Expired once that date passes if it is not yet completed based on the required games
Status colour Green title COMPLETE This will require a task to run at midnight daily (based on the timezone of the office)
Status colour BlueGreen title TODOCOMPLETE Jira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-646
A suspension completes once the suspension has the required amount of purges that are completed games
Status colour Green title COMPLETE If there is a pending suspension dependent on a completed suspension, start the dependent suspension
Status colour Blue title TODO
...
Will need a two-way sync with ID
Jira Legacy server System JIRAJira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-664
This will remove the need to query suspensions in member validation