Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Standings W-L Issue #179

Closed
troyschmid41 opened this issue Dec 1, 2022 · 9 comments · Fixed by #185 or #191
Closed

[BUG] Standings W-L Issue #179

troyschmid41 opened this issue Dec 1, 2022 · 9 comments · Fixed by #185 or #191
Assignees
Labels
bug Something isn't working good first issue Good for newcomers

Comments

@troyschmid41
Copy link

Describe the bug
The standings tab doesn't seem to populate the W-L records correctly to each team. It looks like the values are correct but not assigned to the proper manager.

Your League ID
866130738192539648

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'League Info/Managers'
  2. Look at W-L records

Expected behavior
Correct W-L assigned to proper manager.

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows
  • Browser: Chrome

Additional context
Add any other context about the problem here.

@troyschmid41 troyschmid41 added the bug Something isn't working label Dec 1, 2022
@troyschmid41
Copy link
Author

The power rankings graph and the managers tab also do not seem to align.

@nmelhado
Copy link
Owner

nmelhado commented Dec 1, 2022

Do you mind posting some screenshots of the mismatch and your league's website?

@troyschmid41
Copy link
Author

managers
standings
standingsSleeper

@troyschmid41
Copy link
Author

I also added the managers tab as they don't seem to align with the power rankings order.

@lrtoenjes
Copy link

I have this problem too and after some debugging, I believe the rostersStore is not remaining sorted by roster_id. Initially, the "Standings" page is correct, as is the "Managers" page. However, I can reproduce the bug by going to the "Drafts" page and then back to the "Standings" page, and that's when the "Standings" has the manager's incorrectly ordered but the records of W-L correct. I have no Svelte experience, but it seemed me that despite processRosters() in leagueRosters.js sorting the rosters by roster_id, the array did not remain sorted when getLeagueRosters() was called in the leagueDrafts.js file.

@nmelhado
Copy link
Owner

nmelhado commented Jan 8, 2023

I have an update coming out (#181) that I believe fixes this just due to revised implementation. I'm hoping to release it within the next week or two.

@nmelhado nmelhado linked a pull request Jan 8, 2023 that will close this issue
@lrtoenjes
Copy link

@nmelhado I synched the change from #185 into my repo and was still able to reproduce this bug by following the steps in my previous comment. For the time being, I've implemented a small change to the leagueRosters.js utility so that subsequent calls to getLeagueRosters() always returns a sorted rosters array. As stated before, I noticed that the first call to getLeagueRosters() would return a sorted array, but every call after that, would return the unsorted array from the store.

@nmelhado nmelhado reopened this Jan 14, 2023
@nmelhado
Copy link
Owner

Ah ok, I was hoping it was fixed due to how team names are being shown. I'll work on a fix for this. Seems like the sort is a little brittle, so I might just move away from that and turn rosters into an object. Might be slightly more work, but it should prevent similar issues from happening again.

@nmelhado nmelhado added the good first issue Good for newcomers label Jan 14, 2023
@nmelhado nmelhado linked a pull request Jan 15, 2023 that will close this issue
@nmelhado
Copy link
Owner

@lrtoenjes this should actually fix it. Sorry for the false fix the first time. If there are still issues, let me know!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working good first issue Good for newcomers
Projects
None yet
3 participants