facebook twitter

Your Cart is currently empty.

joomla custom development

While asking a technical question on forums, please specify Your version of Joomla and JoomSport component.

Bugs when disconnecting a player from team on BE

Bugs when disconnecting a player from team on BE

Hello Irene,

I disconnected (derelated) a player (p) (with player events) from a team (t) and a season (s) (his only season) on BE (this is one missing function on FE for moderator and season admin). The player cannot be seen any more on team view on FE (ok). The player cannot be seen at any season on player list view (ok). But when I select "all seasons" on player list view, I can see him, even though he is not connected to a season (I disconnected him). And even though I cannot see any player event, when I look to the seasons one by one, I can see player events, when I select "all seasons".   

This has two reasons:

-When you disconnect the player (p) from team (t) in season (s), you do not delete the row with player = p, team_id = t and season_id = s, you only update the row by setting team_id = 0. This should be fixed.

-And you should also delete the rows in bl_match_events, bl_squard and bl_subsin (player_in and player_out)... but of course only for the team = t and season = s. This is easy for bl_subsin, because
you have all keys in the table, but you have not all keys in the table bl_match_events and bl_squard, there is no season_id. This is a double database misdesign.

And now I understand, why you refused so long to fix the bug, that season admin should only be able to delete objects within the season, he has right for.

Now you have only two ways to fix this issue.
- you can write a very complicated and unperformant code, that navigates with season (s) and team (t) over all matchdays of seson (s) and for every matchday of season (s) over all matches, to get the match_id's. Then you can delete all rows in bl_mact_events and bl_squard with all the found match_id's and player_id = p and team_id = t (I hope it will have the wanted result, it is just an idea). But this is a terrible solution.

-Or you will alter both tables giving them the season_id, but then you have to migrate the season_id's to both tables during installation of the new version. This is the better way.

But you have to fix this bug, you cannot keep these rows in the database.

Enough for today, but I will go on with my buttom up testing, disconnecting and deleting objects on BE with JoomSport. And I am shure, there will be more, that you will read from me  smile

BR
GTvB

JoomSport Pro Version : 2.9.0
Joomla Version : 2.5.17

GTvB
JoomSport Guru
ranks
useravatar
Offline
740 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Hi,

Thank you for good test cases:)


1)Currently in Player list if in the filter "All" is chosen -  all players registered in the component are displayed.
2)It is not rational to display events for all seasons, as each tournament can have it's own events (for example Soccer tournament,hockey tournament etc) so the table will be too large.
3)In the next release when the player is removed from the Season his events from this Season will not be displayed on FE.  But they will be saved in the database so if the player is back his events will be recovered.

Kind Regards,
Irene
The BearDev Support Team

Irene
Administrator
useravatar
Offline
2201 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Irene wrote:


1)Currently in Player list if in the filter "All" is chosen -  all players registered in the component are displayed.
2)It is not rational to display events for all seasons, as each tournament can have it's own events (for example Soccer tournament,hockey tournament etc) so the table will be too large.

When it is not rational, why do you offer this function ????

Irene wrote:

3)In the next release when the player is removed from the Season his events from this Season will not be displayed on FE.  But they will be saved in the database so if the player is back his events will be recovered.

Sorry, this is a very unrational solution. Think of real life:
A player is related to  a team  and season.
1) Player did not play in any match (bl_squard and bl_subsin) and has no match events (bl_events_values). In this case, it is ok, to derelate him from team/season, because this relation has no childs (he had never caused anything, that is in his statistics). And you don't have to delete any child.
2) 1) Player did play in at least one match (bl_squard and bl_subsin) and/or has at least one match event (bl_events_values). In this case, nobody would derelate this connection (or give me one reason, why anybody should do this), because this player already has statistics (played matches and/or player events). Derelating this player also makes the real happened events unvisible on FE, what is totally wrong. There is only one reason in this context to manipulate this connection: The player will not play for this team/season, because he is injured, left the team .... then you should be able, to set this relation to inactive (a missing function). This means: all his events from the past keep visible on FE and he is not selectable for events and lineups for future matches.

Any player event, that really happened, should never be deleted or be made unvisible on FE. And always keep data integrity in mind (each child must have a parent or a parent relation).

BR
GTvB

JoomSport Pro Version : 2.9.0
Joomla Version : 2.5.17

GTvB
JoomSport Guru
ranks
useravatar
Offline
740 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Hi, GTvB

2)It is not rational to display events for all seasons, as each tournament can have it's own events (for example Soccer tournament,hockey tournament etc) so the table will be too large.
When it is not rational, why do you offer this function ????

We are not offering this. Currently on player list layout if you choose All events will not be displayed. Please see http://demo.joomsport.com/index.php/player-list

Player removed from team issue:

Thank you for detailed described point of view. We will discuss this case and I'll let you know.

Kind Regards,
Irene
The BearDev Support Team

Irene
Administrator
useravatar
Offline
2201 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Ok,

you are right, there are no events when I select "all seasons" on player list.

But there is still a bug left: I can see the player (p) in the list when I select "All seasons". Player p is in no season any more and should not be shown.

BR GTvB

JoomSport Pro Version : 2.9.0
Joomla Version : 2.5.17

GTvB
JoomSport Guru
ranks
useravatar
Offline
740 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Hello,

The option "All" means not all seasons, but all players. So  in Player list if in the filter "All" is chosen -  all players registered in the component are displayed.

Kind Regards,
Irene
The BearDev Support Team

Irene
Administrator
useravatar
Offline
2201 Posts
User info in posts
Administrator has disabled public posting

Re: Bugs when disconnecting a player from team on BE

Hello Irene,

I am an experienced user of Joomsport. And I never would have the idea, that in a selection box, where seasons can be selected, "all" means "all players" instead of "all seasons". In the team view I can also find a selection box with seasons and all means "all seasons". So you have done a misdesign in your user interface. And of course, i miss "all seasons" in the playerlist, when "all" means "all players".
Next time you will tell me that "all" means "all oranges" or "all cars", when it fits into your strategy to defend a misdesigned functionality.

Just redesign the selection box in the playerlist, giving options for a special season, one option for all seasons and make a second filter criterium for all players outside the selection box, that has nothing to do with any season.

BR
GTvB

JoomSport Pro Version : 2.9.0
Joomla Version : 2.5.17

GTvB
JoomSport Guru
ranks
useravatar
Offline
740 Posts
User info in posts
Administrator has disabled public posting

Board Info

Board Stats:
 
Total Topics:
2756
Total Polls:
0
Total Posts:
16786142
Total Posts Today:
2
User Info:
 
Total Users:
10609
Newest User:
joshua
Members Online:
1
Guests Online:
697

Online: 
mbrown

Forum Legend:

 Topic
 New
 Locked
 Sticky
 Active
 New/Active
 New/Locked
 New Sticky
 Locked/Active
 Active/Sticky
 Sticky/Locked
 Sticky/Active/Locked
top

JoomSport.com is not affiliated with or endorsed by the Joomla! Project or Open Source Matters. The Joomla! name and logo is used under a limited license granted by Open Source Matters the trademark holder in the United States and other countries