ho-dev / HattrickOrganizer

Assistant for Hattrick online football manager
https://ho-dev.github.io/HattrickOrganizer/
GNU Lesser General Public License v3.0
195 stars 79 forks source link

[eFEAT] break up statistics on module Matches #470

Closed murko69 closed 3 years ago

murko69 commented 4 years ago

First of all, thanks a million for Beta 3.0 with the option to uncheck unwanted game types to download. Also thanks for previously adding a few more options (secondary cup games and qualifying games) under module Matches.

Now I'm looking at the very same module again and I realize I would like to break up the statistics even more. Looking at my stats (the screenshot) I can tell I have 1952 played (league, cup, secondary cup, friendly and qualification) games. I want to see that total, but also want to break them up in where the game was played. Home vs. Away. How many W-D-L at home, how many goals... what's the stats for league games, playing counter attack, away etc...

1ea181189023074a82b0282c852d3216

Having said that, I realize some games are played on a neutral arena (cup games in the late playoffs, probably most HTO-games and also chosen friendly games) so adding stats for home, away and neutral playground would be very neat indeed. OBS! Not taking away the total though - I still want that :)

MaSedlacek commented 3 years ago

@akasolace @murko69 Hey guys, Is this the implementation you expected?

hto_filter_matches_location

murko69 commented 3 years ago

@MaSedlacek That looks amazing

MaSedlacek commented 3 years ago

@murko69 Great, thanks for swift feedback. I'll finish the feature in this way then.

akasolace commented 3 years ago

Hi @MaSedlacek,

I have not been very present lately. Welcome to the project, are you close of being able to submit a PR ?

MaSedlacek commented 3 years ago

Hi @akasolace, A couple of things to finish. I might work on in this weekend but not sure I'll finish it completely. Is there a deadline so you can easily include the feature in the next release?

akasolace commented 3 years ago

Hello, Ideally, I would like to release the beta version in June. If you can submit your PR at some point next week that would be perfect. Also, let me know if you can/want to tackle one of the remaining open ticket for 5.0 milestone. Cheers

MaSedlacek commented 3 years ago

Hi, PR created, kindly check.

I guess I can have a look at #1016 and #1019, those seem easy. The other unassigned tasks seem to be connected to the changes introduced in features for 5.x I'd like to contribute more yet I can't promise much for 5.0 - prefer to be outside in spring/summer months :)

Thanks.

akasolace commented 3 years ago

should be fixed by #1032, @murko69 thank you for testing (especially filter for games on neutral grounds)

akasolace commented 3 years ago

@MaSedlacek thank you again for your contribution, I agree #1016 and #1019 are nice pick. To have them assign to you, just comment 'take' in the issue

murko69 commented 3 years ago

should be fixed by #1032, @murko69 thank you for testing (especially filter for games on neutral grounds)

Just updated the DEV-version and will try to find the time to test drive this one after the weekend, when I have a week off work!

akasolace commented 3 years ago

@murko69 have you had time to test it ?

akasolace commented 3 years ago

@MaSedlacek not sure what happened and when but I just check it to see whether or not I could close it and it is completly broken

MaSedlacek commented 3 years ago

@akasolace Do you mean the layout is broken or whole statistics tab is broken? I can have a look in the evening.

akasolace commented 3 years ago

nothing is displayed ...

MaSedlacek commented 3 years ago

I don't know what's happening after the build but it looks fine when I ran the app locally - even when running from the current upstream master. Any further info available?

akasolace commented 3 years ago

@MaSedlacek you are saying looks fine when ran from IDE but fails when using built apps ?

MaSedlacek commented 3 years ago

@akasolace Looks fine when ran from IDEA. I didn't try using built apps. Shall I try? Is there a how to run using built apps?

akasolace commented 3 years ago

I will need to investigate then ...

akasolace commented 3 years ago

@MaSedlacek I don't get it... I wanted to look into this but it seems to work just fine now ....

MaSedlacek commented 3 years ago

@akasolace Glad to hear it works fine in the end. I was afraid I messed something up with git :)

murko69 commented 3 years ago

@MaSedlacek @akasolace

Sorry to comment on a closed issue, but I've had a handful of months going without any computer at home and played the game with mobile :) Computer died in the end of May before I really could test this! Didn't want to install dev. on my work computer but now I did that anyway and have a few questions about the feature "Neutral ground"

Checking my league games I have a total of 947 matches. 473 at home + 474 away (=947)

So far so good, but it also tells me I have 13 league games played on neutral ground I wonder if 13 of my league games might be derbys? They're still not played on neutral ground but the home advantage is gone so maybe that's why 13 games are listed there? Odd to have an uneven number of games though but maybe I just played one game agains a team from teh same region my first season since I joined half way through

I also checked my cup games. I have 249 cup games (only counting national here) 62 of these I was listed as home team 187 of these I was listed as away team Thats my 249 cup games

But... I also have 4 listed as neutral ground.

This might actually be 100% correct if it's "listed as home team" (mentioned first) + "listed as away team" (mentioned last) that = home + away. Also counting the 4 games actually played on neutral ground (later rounds in the cup) as home/away depending on when the team is mentioned

As far as numbers go (W-D-L, GF-GA) it also all seem to add up (at least as far as home/away goes).

Also checked my 20 qualifications games as well. 12 at home 8 away 1 on neutral

Cecking the data from the neutral game it was easy to see what game it was and that 'neutral' game was played in region Närke in Sweden - I play in region Värmland so even though it's neighbouring regions it's not neutral=derbys here. There is an off chance the team changed their regions though since this was season 20 and they are now a bot team, but I doubt it.

Is this how 'Neutral' is supposed to work? Cup games seem logic, and I will try and find all my cup games played on neutral ground tomorrow, to check if those numbers are correct

Regarding league games and qualifications maybe not so much logic...... or...!?

wsbrenk commented 3 years ago

neutral tagged matches no longer count as home or away match.

murko69 commented 3 years ago

neutral tagged matches no longer count as home or away match.

Sounds logic!

And neutral matches are only cup games (national and extra cups [emerald etc], round for 'last 64' or something) ladders and tournaments right?... Also adding the possible neutral ground in friendlies to the above...

But I also have 13 league games and 1 qualifying game that somehow is put on 'neutral ground' accordning to HO. I'm guessing the 'tag' is fetched with Hattrick data but I really don't know how league and qualifying games could have such a tag.

Edit: I have double checked my 4 National Cup games (I wrote about in a previous post) that was put on Neutral ground and they are correct, On rare occasions even I stay longer in the cup :)

wsbrenk commented 3 years ago

And neutral matches are only cup games (national and extra cups [emerald etc], round for 'last 64' or something) ladders and tournaments right?...

HO looks if arenaID is neither home team's arena nor away team's. i only know this from friendlies or hto matches (tournament ...). the arenaId of the matches are stored in the HO database (Matchdetails and MATCHKURZINFO). the opponents arena id is not stored in the database. so it would be difficult to check if the algorithm is OK.

murko69 commented 3 years ago

Investigating a bit further about these strange 'neutral league games'. I've realized that all 13 of my listed league games somehow played on Neutral ground is all really away games. All of my 473 played home games in the league are correct in HO thus telling me these are away games.

When choosing the radio button 'Neutral' on league games I count 13 games. Moving to the tab 'Matches' I'd hope to see these 13 games but instead I get all 948 league games. With a bit of detective work* I found at that this away game counts as neutral ground according to HO

*Somehow I chose MOTS in that game back in 2006 and won 7-0 and HO shows 1 game neutral game with MOTS and a 7-0 win away :P

Finding remaining 12 games wouldn't be that easy :/

murko69 commented 3 years ago

Here's another one of the 13. I had one game using 4-3-3, winning 5-0 so I found that one pretty quick aswell.

Don't know if these match links help you finding out why they are tagged as 'neutral games' though!

murko69 commented 3 years ago

Sorry... I'm back :) Found an error in DEV-version when chosing 'show my secondary cup matches' I get a list of all my 2093 matches (league, cup, friendly, qualifcation)

Also.... But I think I just misundestood this. Chosing "Show my Secondary Cup matches" should of course show only the ones from 'emerald, sapphire, ruby and consolation cup) Chosing "Show my Cup games" gets me of list of all cup games (national + all secondary ones) I actually thought the latter should show only national

Maybe add a third option*(?), like:

Show my Cup Games (ALL Cup games) Show my Cup Games (National Cup Only)* Show my Cup Games (Secondary Cups only)

akasolace commented 3 years ago

confirmed

akasolace commented 3 years ago

@murko69 I will let you check with latest build ...

murko69 commented 3 years ago

Didn't find any updates via 'search for updates' in app so I updated manually

HO now shows 53 matches for me under 'Show My Secondary Cup matches'. That's still to many eventhough it's closer than yesterday :)

If I check the TAB 'matches' I can see 17 games in there with issues. Don't recognize the icon used but 16 of them are National Cup games from my seasons 76, 77, 78 There is also a Secondary Cup (Sapphire) amongst the 17 with wrong icon. That's from season 76

See image: 909cf15a986fbb7d64a89f258cea3109

wsbrenk commented 3 years ago

@murko69: what happens if you reload this match?

reload

murko69 commented 3 years ago

Duh, never thought about checking that :) Did that now on the Sapphire-game with faulty icon - Nothing (other than being reloaded) happened

Maybe removing first and then try to re-download?

Will try that before I go to sleep

murko69 commented 3 years ago

That did the trick actually - deleting them first and then re-download 'old games' (oldest faulty game was from october 2020 so not that much was needed).

Now I have 37 games listed under "Secondary Cups" and that's 100% correct and the National Cup games listed under wrong category are moved to where they belong :)

Thank you!

akasolace commented 3 years ago

ok sounds good @wsbrenk however it is strange that reload does not do the same as delete + reload

murko69 commented 3 years ago

Just to verify I did it correct.

  1. Pressed the reload button (the one on the left) on a marked game
  2. Waited
  3. Waited some more
  4. Restarted HO

Games was still there in the faulty presence! So I did this instead:

  1. Marked all faulty (17) matches
  2. Deleted them
  3. Pressed F11 and re-downloaded matches and checked box for 'old matches' with a date old enough to cover the games in question

I'm guessing the re-load button on matches page should do all that somewhat automated?!

murko69 commented 3 years ago

Adding two requests about this or at least a discussion about them.

  1. Do you think a third option (mentioned it earlier) for cups would be logic/useful? Today: "Show my cup games" = National + Secondary Cups "Show my Secondary cup games" = Secondary Cups only

I think it would make sense to also have "Show my National cup games" = National Cup games only

How do you feel about that?

And... 2, On matches module there are 3 Tabs. a. Matches b. Stats (W-D-L) c. Stats (Goals)

On the second one I can now chose venue: "All, Home, Away, Neutral" Example: Lets say I'm checking my cup games (all of them), I have 288 cup matches in total and on the tab 'Stats (W-D-L)' I now chose venue 'Home'. I can now see W-D-L-stats from my 70 Cup Games on home ground. But if I change tabs to 'matches' all 288 are listed Also the tab 'Stats (Goals)' still shows stats from all 288 matches,

Is it possible to update all 3 tabs according to how I chose to show "All, Home, Away, Neutral"?

Edit: If the latter is possible maybe drag the venue-options away from the one TAB and put it outside like: hepp

wsbrenk commented 3 years ago

@wsbrenk however it is strange that reload does not do the same as delete + reload

confirmative - up to now i've no idea, why this does not work as expected.

@murko69 : Good ideas concerning further improvements of that feature. But I would like to suggest @akasolace to switch to beta status soon. That's why I wonder if we should postpone further improvements/features to the next release.

wsbrenk commented 3 years ago

2 new tickets created - close this one.