Open jmgasper opened 3 years ago
This is an issue with the frontend. I tested and the API does return all resources correctly.
maybe the frontend is doing a currentUser.userId === challenge.createdBy
kind of check which fails and it assumes the user does not have access?
You can also see in the network tab that all resources are being returned by the API
@ThomasKranitsas - I think if the check of currentUser.userId === challenge.createdBy
failed, I wouldn't be able to edit it as a manager, but I can? Seems strange that only the copilot field is affected.
@jmgasper is that task is deleted now? v5 api is returning on 404 to me.
@ThomasKranitsas I don't we are doing any thing like currentUser.userId === challenge.createdBy
. And the resource record that you shown in your screenshot does not have the copilot role id, in dev and prod both, the copilot role id is cfe12b3f-xxxx-xxxx-xxxx-ec86726f76bd
. Front end just looks for the role id for the Copilot
role by matching its name
and once we have the role id, it just tries to locate the corresponding challenge resources array.
So, my investigation says, if we don't get the copilot role returned for a logged user via the v5 resource api, WM won't be able to show the copilot of the challenge to that user. And I have already shared the same with some proofs in our Slack channel @ThomasKranitsas . Let me know if I can do any further investigation to help you guys out here.
@vikasrohit - Note that this task was created in dev: 6b5f5af8-70ea-459d-8591-ef554aff1359 is the UUID
@vikasrohit has anything changed on the WM? I just opened the exact same challenge and everything shows up fine.. ¯_(ツ)_/¯
@ThomasKranitsas - https://challenges.topcoder-dev.com/projects/17090/challenges/6b5f5af8-70ea-459d-8591-ef554aff1359/view ?
I still see copilot as empty.
I'm logged in as TonyJ
Thanks @jmgasper for pointing it out, I was extra cautious about noticing the env, but somehow I missed that you were also referring the dev env.
@vikasrohit has anything changed on the WM? I just opened the exact same challenge and everything shows up fine..
@ThomasKranitsas no change since last release a month ago. Also, when I am trying to load the @jmgasper's task it is not returning me the copilot resource (I am not part of the challenge or project at all). Same might be happening for you @jmgasper when you are logged in as TonyJ
.
Expected behavior
A challenge created by Topcoder-X should show the assigned copilot that is assigned via the resources API
Actual behavior
The copilot isn't shown for challenges created via TC-X.
A few notes:
Example:
https://www.topcoder-dev.com/challenges/6b5f5af8-70ea-459d-8591-ef554aff1359
Steps to reproduce the problem
tcx_OpenForPickup
tcx_FixAccepted
Screenshot/screencast