Scoring Rules/Match Types – Competition Sites Follow
Play Cricket already stores a few basic rules as part of the fixture record i.e. the number of innings to be played by each team, and the number of overs. However, there are around 30 further pieces of information which are useful to scoring apps which we need to store in Play Cricket.
A number of templates containing the default values for these rules have already been created. Leagues and clubs can then either attach these templates to their divisions / cups / fixtures or use them to create site specific templates containing the rules relevant to their particular games. For example, the default number of overs per team might be 50, but a league might operate on the basis of a maximum of 45.
The complication within some league sites is that fixtures within a division might utilise different rules within a single season (some leagues play a shorter limited overs game during the first and last weeks of the season, but a longer declaration game during the summer months when there are longer hours of daylight). There is a means within division setup of attaching multiple scoring rule templates and specifying for each one a date range for which fixtures they should be applied to.
Set Up
There is an entry in the Competitions section – Scoring Rules.
Select this to see the existing Scoring Rules templates.
The standard templates that are ‘owned’ by ECB cannot be changed but administrators may take a copy and make their own changes.
To view the templates, click the Select icon. Scroll through to ensure that the rules suit your requirements.
If so, then click the Divisions or Cups tabs and select the divisions and cup competitions to which the rules apply.
If I view the division to which the rule has been applied, it will look like this:
If you have just a single rule, do not enter start and end dates – they won’t be saved. The rule will apply to the entire season.
Customising templates
Where league rules differ from the standard ECB ones, the administrator needs to set these up.
Find the most suitable template and click Create Copy.
Enter a name for the rule and save it.
Make adjustments to the template for your league, save the template and repeat this exercise as necessary.
Multiple rules applied to a division
When more than one rule is to be applied to any of the divisions, then tick the checkbox on the right-hand side of the page.
If the checkbox is unticked and the division already has scoring rules applied, the system will flag an error.
Here is an example of a division with multiple scoring rules applied. A date range for each rule must be applied.
Please take care with dates - there is no validation to check that dates fall within a season. This is to allow indoor leagues to extend into April.
Editing Templates
To edit a template that you have created, click the Select button for that Scoring Rule.
When the changes have been made and you save the changes, a message will appear to inform you that the scoring rules for existing fixtures will be updated if you continue.