function filter_teams_by_group(teams, groups, group)
{
return teams.filter(function(team) {
- return groups[group].indexOf(team.shortname) != -1;
+ return groups[group].indexOf(team.shortname) != -1 || groups[group].indexOf(team.mediumname) != -1;
});
}
get_all_group_games(all_teams, groups, function(group_games) {
// NOTE: filter_teams_by_group will be delayed by one cycle
// after W P1 etc. becomes determined for the first time.
+ // Note that this requires the Groups sheet to pick out
+ // the right teams from the group matches in the Results sheet!
let teams_l1 = filter_teams_by_group(all_teams, groups, 'Playoffs 9th–11th');
let teams_l2 = filter_teams_by_group(all_teams, groups, 'Playoffs 12th–14th');
publish_group_rank(teams_l1, group_games, 'Playoffs 9th–11th');