ORK3 icon indicating copy to clipboard operation
ORK3 copied to clipboard

[Park] Incorrect unit member count on list page

Open jrtaylor-com opened this issue 10 years ago • 8 comments

Old Ref: B12

The company count on the company list page for a park does not match the actual number of members in the company.

jrtaylor-com avatar Jun 09 '14 21:06 jrtaylor-com

More info... This affects both the unit search and the unit list report.

The count seems to update when adding a person for both pages, but not when removing. It will continue to show the names of people that have left the unit on the unit list as well.

Glenalth avatar Mar 05 '17 03:03 Glenalth

Another issue with the list page. Links on the unit owner names don't include the player ID and fail.

Glenalth avatar Mar 22 '17 16:03 Glenalth

The select count probably includes members with a status of Retired which would throw the count off

jrtaylor-com avatar Sep 14 '17 00:09 jrtaylor-com

Ok after digging into it, the counts are off because the SQL query includes the Kingdom ID you are searching from. So if there are 10 members and 3 of them in the kingdom you are searching from, the resulting count is 3.

This also applies when you are searching from a park and that ID is included in the query, it would show the number of players at that park, not the entire total.

@Glenalth do we want to just return the overall total members or do we want to indicate that the count is for members within the search kingdom? Or a combination of?

Viewing the report without a kingdom ID or Park ID gives the actual numbers: http://www.amtgard.com/ork/orkui/index.php?Route=Unit/unitlist&KingdomId=

jrtaylor-com avatar Sep 14 '17 01:09 jrtaylor-com

It should return the number for the chapter or kingdom if the report is being run from there. An extra column for total worldwide would be interesting though. Would indicate if the unit was local.

I did a bit more testing as well, looks like part of the problem is in the Quit function.

Used "Pegasus Valley Adventuring Guild" as a test unit. It had 2 members and was reporting as 2. Added "OrkTestAccount" player to it. Count updates to 3. Removed them from unit via "X" on unit admin. Count updates to 2.

Re-added player to it. Count updates to 3. Used Quit button to leave unit. Count stuck at 3.

Re-added player to it. Count stays at 3. Removed them from unit via "X", count updates to 2.

Glenalth avatar Sep 17 '17 18:09 Glenalth

Yes the X actually removes the user entirely from the unit relation, "Quit" should probably be renamed to Retire since that action only changes the status of the unit relationship to Retired. We could have the method changed to use the same as X but then it would be redundant on one of the lists since the Quit and X columns are side by side in some of the admin views.

What do you think @Glenalth ?

jrtaylor-com avatar Sep 17 '17 21:09 jrtaylor-com

That actually explains a lot about the weird behavior there in the past. It would be good to keep the extra functionality for future expansion rather than eliminate it.

I know the "X" is used throughout the ORK, but it might be worth changing that to say "Delete" to make it more obvious that it is different than "Quit"/"Retire" or whatever language is used there.

I'll look into adding a panel to the unit listings for former members with the front end stuff. I can't wait for the messages and e-mails from all of the local PMs that setup units for people via their own account that are marked as retired members.

Glenalth avatar Sep 18 '17 00:09 Glenalth

Also, the retired members probably shouldn't be showing up in the report counts for number of members.

Glenalth avatar Sep 18 '17 00:09 Glenalth