unitedworldwrestling / arena-public

14 stars 5 forks source link

How can I import athletes into special-named weight categories from excel? #80

Closed futaz closed 2 years ago

futaz commented 2 years ago

Hey!

We are using Arena version 1.5.78.1. We have custom audiences and custom weight categories configured in the custom config menu and there are some weight categories like the second one below:

cadets:
    fs:
        110kg:
            identifier: 110kg
            name: '110 kg'
            minWeight: 93
            maxWeight: 110
            roundsNumber: 2
            roundDuration: 120
            averageDuration: 420
        110pkg:
            identifier: 110pkg
            name: '+110 kg'
            minWeight: 111
            maxWeight: 130
            roundsNumber: 2
            roundDuration: 120
            averageDuration: 420

I know we should call the second one 130kg instead but our client use Arena this way, so... I'm here to find a solution to our problem.

I'd like to import athletes from excel for an event. I've created an xlsx file based on the downloadable import-athletes.xlsx. It's working fine until I have an athlete with a special, +110 kg weight category. Arena shows an error for each row of this kind:

Skipped line 2: The Weight Category cannot be found (cadets -> fs -> +110 kg).

I've tried to put the identifier "110pkg", the name without the kg suffix "+110", the name "+110 kg" and the max weight 130 into the Weight Category column in the spreadsheet, but neither worked.

Can I somehow solve this problem?

Thanks!

csabavirag commented 2 years ago

Hello @futaz! During the import the weight category is looked up based on the weight category identifier truncated by the "kg" text.

Since you had the identifier: 110pkg, please use "110p" as the value in the Excel template.

csabavirag commented 2 years ago

Hello @futaz, were you able to import your athletes this way?

futaz commented 2 years ago

Hello Csaba!

First of all, thank you for your answer! Unfortunately, I had no time to try the solution you suggested yet, but I will.. soon.. and of course I'll close this issue afterward. :)

futaz commented 2 years ago

Hey! Finally I had some time to try it and of course it works! Thank you!