Open bilmakovskiyruslan opened 11 months ago
Hey! Really nice UI!
Indeed I would expect that the loser goes into loser bracket round 2. This is a bug.
I'll fix it soon. Do you confirm you can manually complete the match in loser bracket round 1?
@bilmakovskiyruslan I can reproduce your issue, and I found a workaround that you can use for now.
const manager = new BracketsManager(new InMemoryDatabase());
const tournamentId = 0;
const name = tournament.name;
const type = 'double_elimination';
const settings: StageSettings = { grandFinal: 'simple' };
const seeding = ['1', '2', '3', null];
await manager.create({ name, tournamentId, type, settings, seeding });
const config = await manager.export();
// Note: you don't need await here
- for await (const data of config.round) {
+ for (const data of config.round) {
// Note: do you know that you can use the `matchesChildCount` property in settings?
// https://drarig29.github.io/brackets-docs/reference/model/interfaces/StageSettings.html#matchesChildCount
await manager.update.matchChildCount('round', data.id, 1);
}
// You don't need this, and removing it should fix your issue.
- await manager.update.seeding(tournamentId, seeding);
await manager.update.matchGame({
id: 1,
opponent1: { score: 1, id: null, result: 'loss' },
opponent2: { score: 0, id: null, result: 'win' },
});
return await manager.export();
yes, without await manager.update.seeding(tournamentId, seeding)
bracket progress works fine
In case I want to set up different best-of settings for each round. Steps:
Expected result: the loser from the first round moved to the second round (lower bracket)
Actual Result: the loser from the first round sticks in the first round
Is it possible to move a user from the lower bracket to the next round automatically (if no opponent)?