• Resolved yuanga

    (@yuanga)


    Hello, in the “SportsPress > Configure” menu I try to add a “Player Statistics” with the format “time” but when I click on “Update” the format automatically changes to “number”.

    How can I show the average minutes played by a player if I can’t set it to minutes format?

    I have entered the minutes by importing a csv file. I have only been able to enter the minutes correctly if I enter the seconds played (I am talking about a basketball game -> 25:12 are: (25*60)+12 = 1512 seconds). If it is not correct, how should it be?

    Thank you!

    The page I need help with: [log in to see the link]

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Contributor Savvas

    (@savvasha)

    Hi @yuanga,

    I tried to replicate your issue at my test environment, with no success…

    What I did:
    1. Create a new performace with “time” format. The performance was saved ok. https://snipboard.io/1W8oVH.jpg
    2. Add minutes:seconds to a player in two events (25:25 and 15:45)
    3. At player profile, the summation is correct as you can see (total minutes:seconds 41:10)

    Are you using the latest version of SportsPress? Can you try to disable all your plugins except SportsPress and check if you are having the same issues?

    Thanks,
    Savvas

    Thread Starter yuanga

    (@yuanga)

    About step number 2: I am importing the values from a csv file and when the value of that field is 34:14 (for example), the form imports only 0:34. I tried even with 34:14:00 but the result is the same (0:34). The only way I managed to import the game time correctly is by putting it in seconds: (34*60)+14=2054 -> You can check it at this link: https://www.sobrelabocina1930.com/event/baskonia-joventut -badalona/ (all players now have the correct playing time). The problem comes with statistics.

    In this new address you can see how the statistics look. The “prova” column shows what it looks like by importing “34:14” in the csv, and in the “M” column importing the seconds and averaging the two matches: https://www.sobrelabocina1930.com/player/ andres-happy

    Thread Starter yuanga

    (@yuanga)

    I have the same problem

    Plugin Contributor Savvas

    (@savvasha)

    Hi @yuanga,

    You are right! If you use the XX:YY format while importing time performances then, it will import only 00:YY data. If you convert XX:YY to seconds and use this value while importing, then the correct XX:YY is stored to the site. Quite strange indeed… I will forward this to our dev team for further investigation.

    Thanks,
    Savvas

    Thread Starter yuanga

    (@yuanga)

    Please keep us posted! ??

    Plugin Contributor Savvas

    (@savvasha)

    Hi there @yuanga,

    The issue is going to be fixed with the following Pull Request:

    https://github.com/ThemeBoy/SportsPress/pull/456

    You are free to give it a try ??

    Thanks,
    Savvas

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Minutes changes to number in statistics’ is closed to new replies.