...
Property | Type | Description | |
---|---|---|---|
id | uuid | ||
sanctionId | id | ||
offense | number | 1, 2, 3… | |
Behaviour | |||
durationType | enum | Definite or Indefinite | |
games | number | Total games required to serve | |
lastMinutesGames | number | Optional - Total games required to serve when end of game or overtime (will hardcode to last 10 minutes for now) (undefined → fall back to totalGames) | |
injuryGames | number | Optional - Total games required to serve when penalty has an injury (undefined → fall back to totalGames) | |
days | number | Optional - Number of days to calculate the expiry date | |
lastMinutesDays | number | Optional - Number of days to calculate the expiry date in the last 10 minutes | |
injuryDays | number | Optional - Number of days to calculate the expiry date when penalty has an injury | |
Accumulation | |||
| enum[] | Optional - Applicable to players or bench staff | |
| Default to 1 | ||
|
|
| |
|
|
| |
|
|
|
Settings Models
OfficeBreak (V2)
Required to define breaks when calculating the suspension expiry date for the season. Could also be used for the scheduler.
...
Property | Type | Description |
---|---|---|
lastMinutesDuration (V2) | 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 |
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 |
requiredGames | number | Number of games required to complete the suspension. Optional when Indefinite duration 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 |
Suspension Discipline
Property | Type | Description |
---|---|---|
id | uuid | |
suspensionId | id | Suspension |
additionalGames | number | Number of additional games to the suspension |
durationType | enum | Definite or Indefinite. To allow infinite duration |
status | enum | Pending | Active | Inactive |
comments | string | Comment section to allow the discipline committee to note changes |
reviewedBy | string array | Array of members that reviewed the suspension |
reviewedAt | timestamp | The date / time when goes from Pending to Active or Inactive |
...
Property | Type | Description |
---|---|---|
effectiveRequiredGames | number | requiredGames (Suspension) + additionalGames (SuspensionDiscipline) = effectiveRequiredGames
|
effectiveDurationType | enum | durationType (SuspensionDiscipline), if none → durationType (Suspension) |
disciplineAdditionalGames | additionalGames (SuspensionDiscipline) | |
disciplineDurationType | enum | durationType (SuspensionDiscipline) Definite or Indefinite. To allow infinite duration |
disciplineStatus | enum | status (SuspensionDiscipline) |
...
Implementation
New Scopes
Scope | Access | Implementation |
---|---|---|
| Can access the suspension show page or lists | Suspension model: allow Any role that currently contains |
| Can edit suspensions | Suspension model: allow Any role that currently contains |
| Can see the suspension discipline card on a suspension | Suspension: allow SuspensionDiscipline: |
| Can edit the suspension discipline on a suspension | Suspension: allow SuspensionDiscipline: |
| Has access to create a SuspensionDiscipline on a Suspension in pending status (custom endpoint) | Custom endpoint on SuspensionDiscipline model: |
...
SuspensionDiscipline Model
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1279 Migration to add table
Add new model to API (one-to-one relation with Suspension)
Add scopes:
suspensions:view
,suspensions:manage
,discipline:view
,discipline:manage
,discipline:trigger
All roles that have
scoresheets:view
should now also havesuspensions:view
All roles that have
scoresheets:manage
should now also havesuspensions:manage
Change the current suspension model to have
suspensions:view
/suspensions:manage
instead ofscoresheets:view
/scoresheets:manage
New
SuspensionDiscipline
table should havediscipline:view
,discipline:manage
anddiscipline:trigger
scopes.
EffectiveSuspension (View)
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1348 EffectiveSuspension to get suspension total games to purge
https://spordle.atlassian.net/wiki/spaces/SPR/pages/edit-v2/2952200206#EffectiveSuspension-(View)
Adjust purging logic to account for SuspensionDiscipline
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1345 Where ever we show the total number of games in the UI (ex. when purging, use effectiveRequiredGames and effectiveDurationType)
In backend, use effectiveRequiredGames and effectiveDurationType for purging logic
Metabase reports → use EffectiveSuspension → effectiveRequiredGames
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1349 Card to display and edit discipline committee information
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1346 Add new card for Discipline Suspension (should only be viewable by
suspensions:discipline
scope rolesAdd the following fields on the suspension grid:
Original required games (can be indefinite)
Discipline additional games (can be indefinite)
Effective required games (can be indefinite)
Required Discipline Committee option on Sanction Offense
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1344 Add requireDisciplineCommittee on sanction offense
On create of a suspension off a sanction, if requireDisciplineCommittee is true, create a suspension discipline record with a pending status.
Notifications for requireDisciplineCommittee suspensions
Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1350 Will be part of the suspension email we currently send
View for
suspensions:{}
scope roles to see list of Pending SuspensionDiscipline records. Potentially a Suspension Tab / List.Jira Legacy server System Jira serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-1351 Have ability to filter on
Pending
suspension discipline forsuspensions:discipline
scope
If suspension discipline goes from
Pending
toActive
and Suspension isCompleted
. Move suspension fromCompleted
back toActive
. (to revise, edge case)
Lineup Status
Status | ||||
---|---|---|---|---|
|
...