...
Instead, we’ll move away from the single Draft model to a parallel games table (likely called DraftGames) which we can work with like any other model.
Table of Contents |
---|
Requirements
List of issues that this proposal aims to resolve
Draft games need to be shared to associations who need to be able to view all their draft games in one place regardless of schedule
Draft games must be in their own model to make this relation feasible
Draft games may impact availability as soon as they’re scheduled even if not yet “published”
This setting currently exists
If a draft game is rescheduling reschedules an existing game this should be clearer
Currently this matches on game number transparently
More Need more flexibility on draft creation flows
Currently it’s a rigid info/teams/review/publish flow, certain options may require more details for improved UX
Should be possible to partially publish some draft games when as they’re ready
e.g., one association is done early but others aren’t ready yet
...
Out of scope
...
These issues are not specifically addressed by this proposal and will be addressed in other proposals. This proposal creates a framework to resolve these issues.
Provide a matrix to show how many games each team plays against each other to produce a set of games to be scheduled
Scheduler must produce dates to be able to use the calendar currently
Teams need to be able to propose changes to scheduled games and need approval by other team and/or league approval
Models
Draft
Deprecated. Unpublished games will be created as DraftGame in the migration
DraftGame
Would be nearly identical to Game, with additional properties:
...
Property
...
Type
...
Description
...
gameId
...
number
...
ID of game being updated or the resulting game that was published
This would be automatically filled in based on the game number when generating/uploading games and would be used when using the (future) rescheduling function
...
round
...
number
...
Not 100% sure if this is still desired
...
isShared
...
boolean
...
Grants access to scheduling:drafts role
...
isPublished
...
boolean
...
Acts as isDeleted, but differentiates that it was used
ScheduleTeam
Same as before, with additional properties:
...
Property
...
Type
...
Description
...
order
...
...
This is used to maintain schedule balance when generating additional games.
Adding a scheduleteam would automatically use the next order. Schedulers would be able to adjust the order in the UI
🚩 Competitions integration will create ScheduleTeams, so order needs to be automatic through the API
ScheduleSettings
Add starting game number(s)? If this is per group, should this function as a pg sequence instead? 🚩
...
Property
...
Type
...
Description
UX
Draft creation will no longer be a single page workflow, since games will no longer be within a draft. Instead, draft creation behaves more like an import modal. This applies to entering the options before games are produced (as in the first two steps currently).
...
Once the information from the draft modal is filled out, draft games are created and they’ll be available in a cards on the schedule, office and office pages.teams pages.
Having a new card being available on these different pages allows schedulers flexibility on how they want to schedule. They could go to the office page for the league to schedule all divisions at once, or to an association page to focus on games involving that association. The card will also have additional filters available to be able to fine-tune to the desired context.
The card will work identical to how the games step currently works with the calendar drag and drop mode being available. We can make use of card expanding (from the reports card) to provide more space to schedule games and use the calendar, or provide a dedicated tab instead.
Generated
Convert the current card design (of the The current schedule info step ) is split into individual multiple steps for matchups and scheduling in the modal
Starting game number input is no longer necessary as drafts will not use a sequence until the games are published
Need to add a previous round input so that the scheduler can continue schedules as usual
This already exists, but isn’t exposed in the UICritical for PCAHA. Need to check if it’s feasible for their schedulers to use this instead of selecting the last league, or if we need to infer from DraftGames. It’s automatically populated based on the “previous draft” input, so this will be replaced with a previous round input.
Helper text should show the latest used round in DraftGames if applicable
ScheduleTeams are now the source for generating the schedule, replacing the teams step
Order matters in team selection.
An order will be added on ScheduleTeams so it can be easily reused. Otherwise, the teams step just duplicates the schedule’s teams tab
We’re able to add more context about number of games produced in the helper text of certain inputs. Originally this wasn’t entirely certain as the teams step came after
When specifying game per team, limit the total games to even numbers to prevent unbalanced schedules
Cross group schedules
Selecting two groups will produce a cross-group schedule
Previously you would select no group then select the team/group in the teams step. This no longer exists, so you need to specify the groups that will be crossed
Creating a draft would need you to select a
groupId
where applicable. For cross-group, provide a switch input that reveals acrossGroupId
group input for the cross group to help enforce the notion that you’re only crossing two groups
Game numbers are pulled from the sequence of the home team group
Resulting games do not have a group associated to them, existing logic around stats does not change
Uploaded
This can behave exactly like existing import modals
Will still need to reuse logic of matching teams and arenas
When matching teams, limit to existing ScheduleTeams
...
Manual
No longer necessary. Schedulers will be able to create draft games directly in the schedule
🚩 The only config this flow needed was a starting number, how do we maintain this functionality?
Add starting number to schedule settings?
This just becomes creating a single draft game at at time, so there’s no special flow necessary as the only configuration was a starting game number
Updates
When a DraftGame is created, search for an existing game the schedule by number and link the gameId automatically. Not applicable on updates.
This will become relevant later when reusing this functionality for game change requests
When editing and display the draft game, clearly show that a game will be updated as a result of publishing
Analysis
We must maintain the existing analysis functionality and move this into an API
The great thing is it’ll be very easy now to mix the published games and draft games and show the analysis at all times in the schedule view (and potentially even the office)
Would want to allow being able to toggle showing draft games so you can see what your schedule is like currently and how the draft games will affect it
🚩 Rounds
Models
Draft
Deprecated. Unpublished games will be created as DraftGame in the migration
DraftGame
Identical to Game, with additional properties:
Property | Type | Description |
---|---|---|
updatedGameId | number | Optional. ID of game being updated or the resulting game that was published This would be automatically filled in based on the game number when generating/uploading games and would be used when using the (future) rescheduling function |
round | number | Optional |
isShared | boolean | Grants access to |
sharedAt | datetime | When the game was shared |
sharedUntil | datetime | When sharing access expires |
isPublished | boolean | Acts as |
publishedAt | datetime | When the game was published |
ScheduleTeam
Same as before, with additional properties:
Property | Type | Description |
---|---|---|
order | number | This is used to maintain schedule balance when generating additional games. This can also be used for initial games in brackets. Adding a scheduleteam would automatically use the next order. Schedulers would be able to adjust the order in the UI ⚠️ Competitions integration will create ScheduleTeams, so order needs to be automatic through the API |
ScheduleSequence
This replaces the start number option in drafts since drafts will no longer exist
...
Property | Type | Description |
---|---|---|
scheduleId | number | |
groupId | number | |
start | string | Starting number (U15T2500) |
current | number | Zero indexed. Increments start (U15T2500) + current (5) = U15T1005 |
max | number | Max number to generate from this sequence (100 caps at U152599) |
Implementation
This can live behind a feature flag under development, as the isolation of drafts makes this convenient.
...
Model changes
Status | ||
---|---|---|
|
Add order to ScheduleTeam
Jira Legacy server System JIRA serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-752 Create DraftGame, add a new card to show them in place of Drafts per flag
Jira Legacy server System JIRA serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-455 Implement game number sequence
Jira Legacy server System JIRA serverId 03e16d48-9e59-3010-89f5-a1a3500d66b7 key SPR-753
Manual creation
Status | ||
---|---|---|
|
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Modal to create draft games one by one via the new DraftGame card
Select multiple games to publish, share, or delete
Analysis dialog
Move the game analysis logic into a library and accessible through the API
Provide an analysis dialog on the schedule page
Import modal
Generation
Status | ||
---|---|---|
|
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Create a stepper modal that mimics the existing cards
New
POST /schedules/:id/generate
API would accept the parameters and create draft games
Import modal
Status | ||
---|---|---|
|
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Follow the existing importers to parse a file
This would import as draft games as well as schedule teams
Should we provide an option to publish directly?
Generation
Create a stepper modal that mimics the existing cards
New
POST /schedules/:id/generate
API would accept the parameters and create draft games
Release
Analysis dialog
Status | ||
---|---|---|
|
Jira Legacy | ||||||
---|---|---|---|---|---|---|
|
Move the game analysis logic into a library and accessible through the API
Provide an analysis dialog on the schedule page
Release
Status | ||
---|---|---|
|
Existing unpublished drafts to be converted to draft games
Cleanup flags, UI and deprecate API
Planner
...
View file | ||
---|---|---|
|
...