Skip to content
This repository was archived by the owner on Mar 4, 2025. It is now read-only.

[$20] - Copilot designation not showing up on Profile #904

Closed
ajefts opened this issue Dec 15, 2016 · 9 comments · Fixed by #943
Closed

[$20] - Copilot designation not showing up on Profile #904

ajefts opened this issue Dec 15, 2016 · 9 comments · Fixed by #943
Assignees

Comments

@ajefts
Copy link
Contributor

ajefts commented Dec 15, 2016

User "ombocorp" is a Studio copilot, shown here: https://community.topcoder.com/tc?module=ViewCopilotPool&size=30&page=5&view=1&sort=12. But his profile does not indicate that he's a copilot (only a designer): https://www.topcoder.com/members/ombocorp/

@ajefts
Copy link
Contributor Author

ajefts commented Dec 15, 2016

Note: This is because the current api/page logic is showing the copilot status based on if they have ever copiloted something as opposed to the profile attribute that says they are a copilot.

@birdofpreyru birdofpreyru changed the title Copilot designation not showing up on Profile [$20] - Copilot designation not showing up on Profile Jan 19, 2017
@birdofpreyru
Copy link
Collaborator

Expected Fix

The Copilot icon and label in the profile (example: https://www.topcoder.com/members/Ghostar/) should be displayed when the user profile returned by the API has the copilot flag set true.

To mock it for testing in the locally deployed version of the App do the following changes in /app/services/user.service.js:

  • After the line 5 add:
    import { getMockUserProfile } from '../../tests/test-helpers/mock-data.js'
  • Change the getV2UserProfile function into:
    function getV2UserProfile(handle) {
      var profile = getMockUserProfile().data;
      profile.copilot = true;
      return Promise.resolve(profile);
    }

This will make any test user a copilot for the front-end.
Don't forget to revert these changes before submitting your PR.

@shubhendusaurabh
Copy link
Contributor

@birdofpreyru can u assign this to me? Thanks

@birdofpreyru
Copy link
Collaborator

@shubhendusaurabh you have it.

shubhendusaurabh added a commit to shubhendusaurabh/topcoder-app that referenced this issue Jan 24, 2017
@shubhendusaurabh
Copy link
Contributor

@birdofpreyru created PR #943

@birdofpreyru
Copy link
Collaborator

@shubhendusaurabh I've merged in your PR, as it solves the issue for the user from the original issue's description, but I leave the issue open for, as I have found, that it is not enough to solve the original problem. E.g. if you look for my profile (I've just become the copilot), I am in the list of copilots here: https://community.topcoder.com/tc?module=ViewCopilotPool&size=30&view=1&sort=0 but both TC API v2, and v3 does not return that I am copilot when my profile is queried. I'd like to wait for more info before deciding what to do with this one.

@ajefts Do you have any ideas, what can be the problem here? Can you tell, which repos host the backend parts related to this copilot and profile reporting?

@shubhendusaurabh
Copy link
Contributor

another issue with the API is that it does not return copilot stats, so copilot badge link doesn't work
https://api.topcoder-dev.com/v3/members/ombocorp/stats/

@birdofpreyru
Copy link
Collaborator

birdofpreyru commented Jan 24, 2017

@shubhendusaurabh OK, now I got what is the problem with stats you was referring to, thanks. Let's wait for additional information from @ajefts about the involved backend code, and then we decide what to do with this ticket next.

@birdofpreyru
Copy link
Collaborator

@shubhendusaurabh Actually, now it does return copilot: true for my profile, should be a caching-related delay in the API. The stats-related issue relates to API, and we don't touch the API for now. Thus this ticket is accepted.

vikasrohit pushed a commit that referenced this issue Jan 27, 2017
* dev:
  updated display name
  updated cognitive description
  test changing react-components version in package.json
  fix issue 947
  Replace URL %20 to dash
  Fix #905
  fixes #940 top menu login/join buttons
  fixed #904 added check for copilot
  Update CAB members on the Community Overview page

Conflicts:
	app/settings/email/email.controller.js
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants