I've done something stupid in Swiss Manager

Discuss anything you like about chess related matters in this forum.
User avatar
John Upham
Posts: 7236
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.

I've done something stupid in Swiss Manager

Post by John Upham » Sun Oct 23, 2022 11:56 am

I've created the four sections for the Hampshire Junior Open in Swiss Manager.

Sadly, only three of them can appear at anyone time on chess-results.com

For some reason two of them (U18 and U12) share the same DataBaseKey of 687690

I've no idea if I can update the key for one to make it unique.

Any suggestions please?
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

Alex McFarlane
Posts: 1758
Joined: Sat Aug 02, 2008 8:52 pm

Re: I've done something stupid in Swiss Manager

Post by Alex McFarlane » Sun Oct 23, 2022 12:02 pm

I would be interested to know how you managed that.

I would suggest that you reload one of the sections (egU12) with a slightly different name and as a new event and link that.

You can delete tournaments from Chess Results but be careful that you don't delete the wrong one.

User avatar
John Upham
Posts: 7236
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.

Re: I've done something stupid in Swiss Manager

Post by John Upham » Sun Oct 23, 2022 12:11 pm

Usually, with multiple sections I create the youngest category first and then its DataBaseKey as the Master for all of the others to link to.

Having created this initial section I then create the next new and use the "Copy Tournament Data" utility to avoid entering common data more than once. Perhaps this operation did it but then again, I've one this before with success.

Puzzling....
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

User avatar
John Upham
Posts: 7236
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.

Re: I've done something stupid in Swiss Manager

Post by John Upham » Sun Oct 23, 2022 2:04 pm

I'm grateful to Paul M. who provided a solution.

In SM take the second duplicate section and blank the databasekey

Then upload to chess-results.com

CR will then allocate a fresh DBK and all is working nicely.

Thanks Paul!
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

Brian Towers
Posts: 1266
Joined: Tue Nov 18, 2014 7:23 pm

Re: I've done something stupid in Swiss Manager

Post by Brian Towers » Sun Oct 23, 2022 11:53 pm

Alex McFarlane wrote:
Sun Oct 23, 2022 12:02 pm
I would be interested to know how you managed that.
There is a bug whereby if you are in SM with tournament A loaded which already has a DBKey (having been uploaded to chess-results) and you create a new tournament B then the DBKey that was there for A is not cleared. You then upload tournament B and chess-results replaces A with B.

As pointed out the solution is to blank out the DBKey in the tournament setup and reload whereupon chess-results will assign a new DBKey.
Ah, but I was so much older then. I'm younger than that now.

User avatar
John Upham
Posts: 7236
Joined: Wed Apr 04, 2007 10:29 am
Location: Cove, Hampshire, England.

Re: I've done something stupid in Swiss Manager

Post by John Upham » Mon Oct 24, 2022 9:39 am

Brian Towers wrote:
Sun Oct 23, 2022 11:53 pm
Alex McFarlane wrote:
Sun Oct 23, 2022 12:02 pm
I would be interested to know how you managed that.
There is a bug whereby if you are in SM with tournament A loaded which already has a DBKey (having been uploaded to chess-results) and you create a new tournament B then the DBKey that was there for A is not cleared. You then upload tournament B and chess-results replaces A with B.

As pointed out the solution is to blank out the DBKey in the tournament setup and reload whereupon chess-results will assign a new DBKey.

Thanks Brian. I think above is exactly the bug I managed to recreate!
British Chess News : britishchessnews.com
Twitter: @BritishChess
Facebook: facebook.com/groups/britishchess :D

NickFaulks
Posts: 8475
Joined: Sat Jan 02, 2010 1:28 pm

Re: I've done something stupid in Swiss Manager

Post by NickFaulks » Mon Oct 24, 2022 1:48 pm

John Upham wrote:
Mon Oct 24, 2022 9:39 am
Thanks Brian. I think above is exactly the bug I managed to recreate!
It does sound like a very easy one to fall into if you are not a Swiss Manager specialist.
If you want a picture of the future, imagine a QR code stamped on a human face — forever.

Paul McKeown
Posts: 3735
Joined: Thu Apr 12, 2007 3:01 pm
Location: Hayes (Middx)

Re: I've done something stupid in Swiss Manager

Post by Paul McKeown » Wed Oct 26, 2022 9:29 pm

John Upham wrote:
Sun Oct 23, 2022 2:04 pm
I'm grateful to Paul M. who provided a solution.
...
Thanks Paul!
Glad to be of assistance.

The important thing to understand is that the tournament key is actually a key into the chess-results.com database. It is generated by chess-results.com, not by Swiss Manager. All perfectly logical, of course, as the key has to be unique across all the tournaments which use chess-results.com to display entry, pairings, results and standings. The key is obviously created by an append to the database (or rather to a sequentially ordered key table), whenever a tournament is uploaded to chess-results.com with a blank key field. The key is then used to produce an unique url for the tournament - for example in your U12 tournament, http://chess-results.com/tnr688238.aspx, the tournament key is 688238, and that should match the value in the SM file for the same tournament.

(If you borked a SM file, you could even copy the key to a corrected SM file, upload and carry on as if nothing untoward had ever happened. That is, assuming you couldn't recover by finding the last correct backup file that SM had produced, and renaming it to blah.TUNx or blah.TURx, as appropriate.)