Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Requirements

All sports

  • Automatic suspensions are not appealable in any sport

  • If suspended, only eligible to “purge” for the same team, otherwise suspended and cannot purge or play on other teams

  • Suspensions follow into the following season and can by served by any team in the following season

  • Schedule office (e.g., league) is responsible for administering suspensions, not team

  • Suspensions prohibit officials from officiating games (exceptions may be granted by the assigner)

  • Notifications to be sent to the player, team staff, schedule and team offices

Baseball

  • Each branch (BQ) has it’s own rules

    • Suspensions do not apply across branches (BQ suspension does not apply in BA), but a Baseball Canada suspension (e.g., from nationals) can apply to all branches

  • Suspensions

    • All penalties (ejections) result in a 1 game suspension

  • No expiry time component or indefinite rules from game infractions

Soccer

  • Each branch (SQ) has it’s own rules

    • Suspensions do not apply across offices (suspension in office A allows play in office B)

  • Suspensions

    • Yellow card

      • 3x accumulation results in a 1 game suspension

      • Resets after accumulation

    • Indirect red card

      • Results in a 1 game suspension

      • Affects accumulation of yellow cards

    • Direct red cards

      • Results in a 1 game suspension

      • No accumulation side effects

  • No expiry time component or indefinite rules from game infractions

  • Suspensions only accumulate with the same office and team

Hockey

  • Federation (HC) sets minimum baselines and each branch (BC) can extend baselines

    • Suspensions apply across the entire federation

    • Suspension rules are based on the schedule office

    • If a BC team plays in an AB tournament, AB suspension guidelines will be used, unless the player fails to purge the suspension prior to returning to BC, then BC guidelines will take effect and could possibly extend the suspension

      • e.g., AB may impose a 1 game suspension while BC imposes 2 games, so a player would be required to serve 2 games upon returning to BC

  • Suspensions

    • Accumulation based on penalty code or set of penalties (accumulation groups)

      • e.g., 7.2(b) will result in a 1 game suspension, and 7.3(b) in a latter game will result in an accumulation sanction (AS104) due to ‘any 2 majors’.

    • Multiple sanctions may be applied.

      • e.g., 7.2(c) in game one results in 1 game suspension, then 7.8(c) in next game results in 3 games under 7.8(c) + 5 games under AS107

      • 🚩 Waiting to confirm if these are separate suspensions (15+25 days) or a single multi-coded suspension (56 days).

    • Accumulation resets each season

      • Head contact accumulation resets prior to minor championships

        • 🚩 Waiting to confirm if we’re isolation the championship office or setting a reset date for this accumulation group

      • 🚩 Waiting to confirm what happens after last defined accumulation

    • Penalty in the last 10 minutes can affect suspension severity

      • 🚩 Waiting to confirm if this includes OT/SO

    • Some sanctions are based on if the penalty was incurred pre/post game, or if an injury was sustained

      • Will need to check incident reports for the injury, may need to add additional meta for penalties

      • 🚩 Waiting to confirm if we can skip pre/post meta

  • Minor / Junior

    • Minor hockey suspensions don’t typically allow purging when transitioning to Junior, but there’s an exception to allow purging if they actually intend to play to help eligibility for next season. This will be handled manually by BC

  • Suspensions have a total required games and expiry date; will be considered completed when the first criteria is reached

    • Expiry has breaks (e.g., winter, summer)

    • Game/expiry ratio is not 1:1 (1/7/15/21/25/30/n*7) and varies by branch. Not defined by HC

    • Game infractions may result in indefinite suspensions

  • Only games that were scheduled at the time of suspension may count towards to the serving of a suspension. Therefore, any game that is added to a team’s schedule after the date of a suspension, will not count towards the serving of that suspension.

    • Rule added to avoid working around with an exhibition game mid-week. Did not commit to supporting this on day 1

  • Team Officials

    • Team officials may be suspended based on player accumulation in the same game or within the season

      • e.g., AS112 for 3 majors in a game, or AS113 for player’s 2nd major in the season

        • 🚩 Need to confirm if AS113 is for player or coach; likely refers to 8.4(b)

    • 🚩 Waiting to confirm which official would be suspended


Models

Currently suspensions are hardcoded since Baseball and Soccer rules are fairly simple, but since Hockey is dependent on penalty codes, we’ll need to add this to the rulebook.

Sanction

Suspensions are linked to a sanction to describe what the suspension is for

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

Rulebook

In the future, we may split out rulebooks into multiple tables, but at this time, this would take too long to ship unhardcoded suspensions in time.

SanctionRule

Will work similar to AssignRule matchers.

  • Minimum sanctions will be defined in the federation and each branch

  • Games will resolve sanctions from all parent rulebooks, children will cancel out parents based on matchers

  • Rulebook validation will require sanctions that match a parent rulebook to be at minimum of the parent

  • Still need to define how to cancel out yellow accumulation for indirect reds in soccer

Property

Type

Description

id

uuid

Automatically generated

name

string

Description of the sanction rule

positions

enum[]

Optional - Applicable 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..? 🚩

Breaks

Required to define breaks when calculating the suspension expiry date for the season

Property

Type

Description

id

uuid

startDate

date

endDate

date

Expiry Ratio

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

Property

Type

Description

id

uuid

games

number

Optional - Number of games the accumulation requires

days

number

Number of days

Suspension

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.

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


Implementation

SPR-614 - Getting issue details... STATUS

Unhardcoding TODO

  • Handle indefinite and expiry dates

    • SPR-646 - Getting issue details... STATUS

  • Replace code with sanctions

    • SPR-665 - Getting issue details... STATUS

Accumulation TODO

  • 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

Supplemental TODO

  • League administrators may edit the suspension to increase the required number of games and expiry date

  • The suspension must be validated to meet the minimum games of the sanction and follow the expiry ratio logic defined in the rulebook

  • If a suspension has the Appealed status, it is still Active at it’s minimum number of games of the sanction as those are not appealable

Lineup Status COMPLETE

  • Get all Active suspensions for each player COMPLETE

    • In soccer, exclude suspensions for other offices COMPLETE

  • If the suspension is for another team, it cannot be purged COMPLETE

Assigning TODO

  • If an official has any active suspension, they should be flagged as Suspended TODO

    • SPR-655 - Getting issue details... STATUS

    • This will be limited to Play suspensions as querying ID will absolutely kill performance

Completion

  • If the suspension type is Indefinite, the suspension can never automatically be completed TODO

    • SPR-646 - Getting issue details... STATUS

  • 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 TODO

    • This will require a task to run at midnight daily (based on the timezone of the office)

    • SPR-646 - Getting issue details... STATUS

  • A suspension completes once the suspension has the required amount of purges that are completed games COMPLETE

Syncing TODO

  • Will need a two-way sync with ID

    • SPR-664 - Getting issue details... STATUS

  • This will remove the need to query suspensions in member validation

  • No labels