Game counter - bug?!?!

Moderator: And_One

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Game counter - bug?!?!

Postby toddybob » Tue Sep 23, 2014 4:53 pm

I am having an odd issue.

I am fully updated with the latest release of Joomleague so....I am not sure if this is already a reported bug but anyway.

Game events and statistics can be displayed in several areas of the site. On the roster itself, on individual player views, etc etc.

Well in my league, which is ICE HOCKEY, when I assign players to a game to then enter the statistics for each player - everything seems to work just fine. The Games played counter on the ROSTER view works perfectly (as does the games played view on the individual player views). However, if i go back into the games to edit them and make a change to the roster (i.e. add a player to the played side, move a player around from offense to defense or whatever) and then click save....the game counter event is moved forward by one (for all players on the roster). But this game counter change only shows up on the ROSTER view, not the individual player view (which is the correct one).

So, for instance, I record a game and enter stats and so on. Roster view shows Games played 1 and player view shows games played as 1. Now I have to go back and make an edit to one of the rosters because someone was assigned incorrectly. We fix the issue, click save.

NOW the roster view shows 2 games played (even though it's just one) and the player view shows 1 game played. This is EXTREMELY frustrating because I also have a Points Per Game statistic that I am calculating in the system that uses the games played event and with those extra entries, it's calculating wrong. 2 points, 2 games should calculate to be 1 PPG but because of this double game count.....it's showing as .5 PPG which is VERY wrong.

So that my league is NOT confused, I have currently disabled the games played count on the roster view and have disabled the PPG stat but I need them to work correctly.

Any thoughts? Is this a known issue? Anything I could have possibly configured incorrectly that could be impacting this ?

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Wed Sep 24, 2014 2:39 am

See image captures below. The Player view is the correct games played stat.

Roster listing with Games played enabled
Image

Click player name to see individual player view:
Image

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Wed Sep 24, 2014 12:37 pm

Have you checked your mysql db manually (e.g. with pma) how much / which data are stored there for that match/player?

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Wed Sep 24, 2014 11:26 pm

I did do a SQL search on some individual player ID's that are exclusive to this season (i.e. they would not have match data for last season) and noticed that their ID's were showing up in additional matches.

for instance - I would do a search on player ID in the matches table and there were 10 Games id's that he was listed in.

I don't know where else to look for that specific counter - if there is one. When the roster view is called is there a SQL query to search for the number of matches that a player ID appears in or is there a individual counter somewhere that is incremented in another table that I can check?

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Wed Sep 24, 2014 11:35 pm


toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Fri Sep 26, 2014 4:32 pm

OK. Here is what I found. I did a bunch of cross table searches for a particular player (I know the specific number won't mean much to you but perhaps you may be able to start to see a trend and can think of what might be wrong)

All searches were performed searching for teamplayer_id.

Player name: Erik Parker
Team Name; Summit X-Treme 18U
teamplayer_ID: 988
What match_id are valid based on his assignments to team rosters: 236,253,258,264

RESULTS OF SEARCH:

Searched: joomleague_match_event
Result: 6 results (all valid)

Searched: joomleague_match_statistic
Result: 0 Results (valid)

Searched: joomleague_match_player
Result: 7 results
game_ids: 236,253,258,261,263,264,268

The game ID's themselves are valid, as they are actual games...however, neither his team nor him were assigned to 261,263,268. So how is there a table entry for him in those games?

Image

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Fri Sep 26, 2014 4:38 pm

Also,

I just did a teamplayer_id search on other players for the same team.

Those teamplayer_id searches also showed the same match_id results as 988. So, for whatever reason...the entire team's roster has 3 additional entries in the joomleague_match_player table.

Any thoughts on how this might or could be happening?

And I looked at the code you linked, unfortunately - I cannot read jquery. But based on the section you linked, it looks as if it was referring to substitution and in/out data. We are NOT using substitutions or in/out stats. Players are assigned to positions on the roster. If they don't play - we leave them in the "Available Roster (Reserve) section.

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Fri Sep 26, 2014 7:57 pm

Can you give me admin login data (pm) to your site so i can have a deeper look?

Gesendet von meinem Galaxy Nexus mit Tapatalk

User avatar
benio08
.
Posts: 488
Joined: Wed May 05, 2010 11:00 am
Location: Poland
Contact:

Re: Game counter - bug?!?!

Postby benio08 » Sat Sep 27, 2014 12:29 pm

I have the same bug when I'm use
Prefill roster option
Automatically prefill the match roster?
Jomla 2.5.8 last joomleague revision

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Sat Sep 27, 2014 5:46 pm

Yes, our league statistician uses the "prefill roster from...." option before entering game statistics.

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Sat Sep 27, 2014 5:54 pm

Heart - the PM has been sent with the info. Thanks. Please note, I currently have the matches played stat turned off on the roster view so as not to cause MASS confusion. If you need to enable to check some things, by all means do so, but please make sure it's disabled before you leave the system.

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Wed Oct 01, 2014 1:58 am

Heart - any chance you were able to check this out yet?

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Thu Oct 02, 2014 4:33 pm

@toddybob stress here sorry... hope I can have a look into it this WE

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Tue Oct 07, 2014 1:50 am

Heart - other folks are reporting a same/similar issue in the system. We are thinking this has to do with using the "prefill match roster" option when setting the team roster before entering game stats.

Is there a setting somewhere that we SHOULD NOT be using? If this functionality is broken, should we be setting each roster by hand?

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Tue Oct 07, 2014 12:50 pm

Ok, checked your backend and only had a look in your global joomleague settings.

You have the settings for prefill like shown in the screenshot.

AFAIK this combination "can't go well in real life". These settings mean always when you enter the events for a match, or click the icon on your team (for starters/subs/...) all of your project players for this team are stored in the mysql db.

Example:
- Game is finished, you go into matches view in the backend and click the events icon (so you set your goals etc)
At this time ALL YOUR PROJECT PLAYERS are stored as starting line up in the db.
- A few minutes later you realize you forgot a goal, so again you click the events icon.
Again, you have all players stored in your db
and so on....

What you have to set when you use "Prefill with match roster with projectteam players" is definitly YES to the option above "On prefill delete the current match roster?" so when you enter the events for the 2nd time for example all the stored players are deleted and stored again with the actual project team players.

But are all your players in the match in every game!?!

For my projects (soccer) it's like I have 20 players in my project team. Prefill is used for the starting line up. And on soccer only 11 players are in the starting line up. So I really don't want that jl prefills all of my 20 players as starting line up (this is what you have set now).

What I do here for soccer is the following:

1) On prefill delete the current match roster? YES
2) Automatically prefill the match roster? Ask which prefill method should be used - only if there is no line-up set already

With this settings you get first the question if you want to prefill your starting line up with the stored starting line up from the prev. game of your team. If you say CANCEL to that question you get the next question if you want to prefill your starting line up with all of your project players from your team.
And... have you already stored any starting line up for this game and you click again the events icon for example you get NO QUESTION/POP UP at all because there are already players stored as starting line up in the db for this game.

Hope this clarify the way prefill is working and that your setting at the moment doesn't make sense ;)
You do not have the required permissions to view the files attached to this post.

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Tue Oct 07, 2014 11:23 pm

So you are basically saying that each time someone edited the "roster" or "edited the goals" for a game that it would created additional entries in the table "joomleague_match_player" rather than overwrite them?

Seems like an odd behavior.

Additionally, how would that explain that player ID's from OTHER teams not associated with either of the two teams playing in a particular match would get inserted in the database table with records for that game? If additional entries are created (because we aren't deleting the previous roster) wouldn't they just be identical entries???? I'm getting players for completely unrelated teams getting tagged with match_ids that don't belong to them.

And some of my game_id's have 10-15000 records in the table? With, on average 40 players max per match - how does a match_id have 10,000 records ??? We aren't editing the the match statistics that MANY times to create that many duplicate records.

I understand the IDEA behind the settings....but honestly, I still think that something is wrong when I am seeing this many records for a single match_id.

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Tue Oct 07, 2014 11:57 pm

Please correct your db, delete all your player id entries and store it again with the correct mentioned prefill settings and look if that fix your problem.

I can only say that I use above mentioned settings for my soccer projects since many years and I didn't have one problem with wrong game counter.

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Wed Oct 08, 2014 12:26 am

OK. I did some testing and checked against records being created in the database.

First: I deleted all records for a specific match_id then I built rosters both ways.

Prefill setting: Prefill from ProjectTeam and deleted roster on prefill=NO
1) Built both rosters 20 players each. Records recorded in database table for match_id = 40.
2) Edited roster and removed 1 player from team A: records recorded in database table for match_id: 39
3) Edited roster again, added player back in to team A: records recorded in database table for match_id: 40
Results: GOOD!

NEXT

Deleted all records from Table so I am starting fresh!
Prefill setting: ACCEPT prefill from last known roster
1) Built both rosters 20 players each. Records recorded in database table for match_id = 76. BAD
* something about the PREFILL from LAST KNOWN Roster algorithm is causing additional entries to be entered for the specified match_id.

Other Observation:
If I ENABLE "deleted roster on Prefill" - Whenever I go into a roster to edit it - it resets it to the full roster prefill (even after I have already prefilled and set my roster with moving people in and out of the active boxes. So I have to go BACK in and re-move all of the people again out of active slots. It's not keeping my 'previous' moves from the active boxes.

*****

So right now, the only behavior I can rely on to not create additional and/or duplicate entries into the database is to:
1) Set to NO = Deleted roster on prefill
2) Set Prefill to "prefill roster from Projectteam"
3) HIT CANCEL whenever I am given the option to prefill from last known roster.

Following those 3 steps keeps my match_id records as they should be in the database table. Otherwise I end up with many more entries in the table than I should and the delete on prefill keeps resetting my roster so I cannot make 'edits' - I pretty much have to do the roster over again everytime I have had to make a change.

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Wed Oct 08, 2014 8:28 am

Again... use this combination mentioned above

1) On prefill delete the current match roster? -> YES
2) Automatically prefill the match roster? -> Ask which prefill method should be used - only if there is no line-up set already

So whenever you click the icon at your team the first time for this match you say OK to the first (prefill from last known roster) or second question (prefill with all project team players).
Then whenever you have to change the roster and/or events you won't get any popup again for this match. (and you can edit your roster/events without any problems - this way it also won't delete anything)

Deleted all records from Table so I am starting fresh!
Prefill setting: ACCEPT prefill from last known roster
1) Built both rosters 20 players each. Records recorded in database table for match_id = 76. BAD
* something about the PREFILL from LAST KNOWN Roster algorithm is causing additional entries to be entered for the specified match_id.

Can you debug this a little more please. When you have 20 project players for team a and 20 for team b you have to click the team a icon and it should prefill the starting line up players from the last known match of this team a (max. 20, so please have a look in your db after you do this for team a).

Next click the team b icon and it should prefill the starting line up players from the last known match of this team b (please check again db entries after you did this).

Then please delete all players for this match again and test clicking the events icon for this match (so you didn't click team a/b icons, the first click should be the events icon). Check again what hapens in the db about the players (for team a and b).

:thx:

Other Observation:
If I ENABLE "deleted roster on Prefill" - Whenever I go into a roster to edit it - it resets it to the full roster prefill (even after I have already prefilled and set my roster with moving people in and out of the active boxes. So I have to go BACK in and re-move all of the people again out of active slots. It's not keeping my 'previous' moves from the active boxes.

This is true when you have set the 2nd option to something other than

"Ask which prefill method should be used" or
"Ask which prefill method should be used - only if there is no line-up set already"

(...and this is intended this way. When you set 2nd option to the other two methods it should delete all players before it gets filled again with all players.)

toddybob
.
Posts: 34
Joined: Fri Mar 22, 2013 3:09 pm

Re: Game counter - bug?!?!

Postby toddybob » Wed Oct 08, 2014 4:55 pm

Ok. I set the options the way you suggested.

Delete Roster on Prefill: yes
Prefill Option: "Ask which prefill method should be used - only if there is no line-up set already"

Scenario #1
1) Cleared the records for match_id 308 on table Joomleague_Match_player:
2) Click Team A icon to fill roster, using prefill from last match option (18 active players & click save). Database records created 37
3) Click Team B icon to fill roster, using prefill from last match (12 active players & then click save). Records added to database 32 for a total of 69 records now existing in database for game_id 308.

Scenario #2a
1) Cleared the records for the match_id 308 on the match_player table.
2) With empty rosters, I clicked the events Icon and was given an option to "prefill from last match". Clicked Yes/Accept
3) Checked the db for match_id 308, 70 records created...all unique.

Scenario #2b
1) Cleared the records for the match_id 308 on the match_player table.
2) With empty rosters, I clicked the events Icon and was given an option to "prefill from last match". Clicked No/Cancel. Was then given option to fill from project teamplayers - clicked accept. 36 records created (19 for Team A, 17 for Team B) which is valid as that is each teams player roster totals but since I am not presented with the Roster editing screen, I am not able to make any roster moves prior to 'saving' the rosters.
3) Go back and click the team roster icons. Edited rosters to remove inactive players (Team A down to 18 players and Team B down to 12 players). Queried db - now 30 records exist for match_id.

Scenario #3:
1) Cleared all records for match_id 308 on table joomleague_match_player
2) Click Team A icon to fill roster, using prefill from project teamplayers (19 total players on roster, 18 active players). Database records created 18. Good
3) Click Team B icon to fill roster, using prefill from project teamplayers (17 total players on roster, 16 active players). 16 records added for match_id 308. Total of 34 records exist. Good
Additional Test: 4) Edit Team B roster to remove 4 additional players to make available roster down to 12. Records removed from db table = 4. Total of 30 records exist. Good

Results:
So once again, accepting/using 'prefill from last known match' (even with the options set the way you suggested) created additional entries in the db table for that specific match_id. I checked the additional records and they were all distinct player_ids - not one duplicate..

Heart
Joomleague Core Developer
Joomleague Core Developer
Posts: 653
Joined: Fri Apr 23, 2010 10:27 am

Re: Game counter - bug?!?!

Postby Heart » Wed Oct 08, 2014 6:47 pm

Can you pm me MySQL/PMA Login data so i can have a look into it?

Gesendet von meinem Galaxy Nexus mit Tapatalk


Return to “en-GB”

Who is online

Users browsing this forum: No registered users and 1 guest

cron