Skip to content

[$80] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating #4947

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

Open
harshitmehta15 opened this issue Sep 17, 2020 · 29 comments
Assignees
Labels
Leaderboard All issues related to MM Leaderboard Member Profiles tcx_Assigned

Comments

@harshitmehta15
Copy link

harshitmehta15 commented Sep 17, 2020

The user rating displayed on MM (Registrant and Submission Tab) is max(SRMrating, MMrating), should be MM rating.

Description: Member registration tab shows MAX Rating out of all the rating member has and the Submission tab shows MM Rating on a Marathon Match Type Challenge. Both should show MM Rating.

@harshitmehta15
Copy link
Author

harshitmehta15 commented Sep 17, 2020

@Oanh-and-only-Oanh
I think this got changed after v5 updates, can we revert the change?

@Oanh-and-only-Oanh Oanh-and-only-Oanh added Leaderboard All issues related to MM Leaderboard Member Profiles labels Sep 17, 2020
@Oanh-and-only-Oanh Oanh-and-only-Oanh added this to the Release by 10/8/2020 milestone Sep 17, 2020
@Oanh-and-only-Oanh Oanh-and-only-Oanh changed the title Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating [$80] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating Sep 17, 2020
@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30142336 has been created for this ticket.

This is an automated message for crazyk via Topcoder X

@crazyk07
Copy link

Contest https://www.topcoder.com/challenges/30142336 has been updated - it has been assigned to cagdas001.

This is an automated message for crazyk via Topcoder X

@Oanh-and-only-Oanh
Copy link

@cagdas001, please resolve this ticket first #4875. The other is high priority.

@Oanh-and-only-Oanh Oanh-and-only-Oanh changed the title [$80] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating [$50] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating Sep 17, 2020
@Oanh-and-only-Oanh Oanh-and-only-Oanh changed the title [$50] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating [$80] Marathon Leaderboard displays Max Rating(SRM, MM) should display MM Rating Sep 17, 2020
@cagdas001
Copy link
Collaborator

@cagdas001, please resolve this ticket first #4875. The other is high priority.

@Oanh-and-only-Oanh its waiting for API Team

@cagdas001
Copy link
Collaborator

@Oanh-and-only-Oanh which branch I'll target for this one? Milestone is Release by 10/8/2020 but there is no branch for it. I'm targeting milestone-20200924 ?

@cagdas001
Copy link
Collaborator

cagdas001 commented Sep 17, 2020

It basically shows whatever it gets from resources-api in the rating field.

For e.g. https://api.topcoder.com/v5/resources?challengeId=457fe241-0687-4f60-a379-a3979a0d7210&roleId=732339e7-8e30-49d7-9198-cccf9451e221 You can take the member Kriii for reference, as the issue exists & reproducible with this member.

resources-api gets the rating directly from member-api from DB (maxRating):

https://github.com/topcoder-platform/resources-api/blob/4edee0c7e666439e99e984c551f3753c447a9e0e/src/services/ResourceService.js#L148
https://github.com/topcoder-platform/resources-api/blob/4edee0c7e666439e99e984c551f3753c447a9e0e/src/common/helper.js#L154

If you're intending to show particular ratings for each track/challenge, I currently don't see such a response structure in resources-api

So, either it should return something like the following, so we can get particular ratings

ratings: {
  "SRM": 2878,
  "MARATHON_MATCH": 1791,
  ...
}

or should detect the challenge track/type based onchallengeId and should return rating based on this.

cc @Oanh-and-only-Oanh @rootelement

@cagdas001
Copy link
Collaborator

cagdas001 commented Sep 17, 2020

Ops. sorry for confusion. resource-api doesn't call member-api. directly queries from db https://github.com/topcoder-platform/resources-api/blob/4edee0c7e666439e99e984c551f3753c447a9e0e/src/common/helper.js#L154

Edited the above comment accordingly as well

@Oanh-and-only-Oanh
Copy link

@cagdas001, member registration tab shows MAX Rating out of all the rating member has and Submission tab shows MM Rating. They should not how different ratings. Both tabs should show MM Rating.

@cagdas001
Copy link
Collaborator

cagdas001 commented Sep 17, 2020

@Oanh-and-only-Oanh on my side, submissions tab also shows wrong rating.

Profile Submissions Tab
chrome_2020-09-18_00-03-55 chrome_2020-09-18_00-04-48

The issue is that, resource-api returns maxRating. It should work in one of the ways I explained in my comment (#4947 (comment)) for us to show particular ratings:

So, either it should return something like the following, so we can get particular ratings

ratings: {
  "SRM": 2878,
  "MARATHON_MATCH": 1791,
  ...
}

or should detect the challenge track/type based onchallengeId and should return rating based on this.

@Oanh-and-only-Oanh
Copy link

@cagdas001 looks like MM ratings was fixed not long ago before it's now broken again. check out this closed ticket. #4730 Maybe it can help? Also @luizrrodrigues was the member who fixed it so maybe he can shed some light.

@cagdas001
Copy link
Collaborator

cagdas001 commented Sep 17, 2020

@Oanh-and-only-Oanh This issue has been closed without fixing the wrong rating issue: #4730 (comment)

@luizrrodrigues @sushilshinde , we are tracking this here #4794.

As the other issues in the ticket are fixed, we can go ahead.

Additionally, I guess #4794 is about member-api. We're getting rating from resource-api here.

@Oanh-and-only-Oanh
Copy link

@rootelement this a resource api issue and that it should return the maxRating instead of particular rating for the track. Please help.

@harshitmehta15
Copy link
Author

harshitmehta15 commented Oct 13, 2020

Hi, @Oanh-and-only-Oanh Any updates on this? :)

@adroc-tc

@Oanh-and-only-Oanh
Copy link

Instead of resources API use member API. Update CA frontend to call different API.

@SathyaJayabal SathyaJayabal removed this from the Release by 10/8/2020 milestone Dec 30, 2020
@Oanh-and-only-Oanh
Copy link

Oanh-and-only-Oanh commented Jul 6, 2021

@rootelement , can you help with this issue during cool down?

@harshitmehta15
Copy link
Author

harshitmehta15 commented Jul 6, 2021

@sushilshinde @rootelement tldr; (from the above discussions)
There are two ways to solve this

  1. Use Member API (instead of Resource API) to fetch the specific rating based on what type of challenge is.
  2. Update Resource API to return ratings of all the tracks.

@rootelement
Copy link
Contributor

rootelement commented Jul 6, 2021

Resource api will not be updated to house that information. That's not relevant to the resource, and rating only there for basic convenience on the site. This has to be updated to pull that information from the member API. Consult with @urwithat on the appropriate usage.

@Oanh-and-only-Oanh
Copy link

Use the member api to fetch the specific rating based on what type of challenge is needed. The api exists and here is the curl for it:
Member v3 -
curl --location --request GET 'https://api.topcoder-dev.com/v3/members/tourist/stats'
Member v5 -
curl --location --request GET 'https://api.topcoder-dev.com/v5/members/stonefeang/stats'

@nursoltan-s
Copy link
Collaborator

@bug-bash-helper assign me

@bug-bash-helper
Copy link

@nursoltan-s 🛑 this issue is not included in the Bug Bash.

You may only pickup issues which are included in this Bug Bash and open for pick up.
Such issues have open status and have labels CF and Open for Pickup.

@nursoltan-s
Copy link
Collaborator

@Oanh-and-only-Oanh
Hi, if it's open for pickup, can i take this issue?

@Oanh-and-only-Oanh
Copy link

hi @nursoltan-s, it's picked up by @rakibansary for now. thanks!

@nursoltan-s
Copy link
Collaborator

hi @nursoltan-s, it's picked up by @rakibansary for now. thanks!

got it.

@rakibansary
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Leaderboard All issues related to MM Leaderboard Member Profiles tcx_Assigned
Projects
None yet
Development

No branches or pull requests

9 participants