topcoder-platform / community-app

React webapp for serving Topcoder Community
125 stars 212 forks source link

[$15] copilot fulfillment should be consistent #1011

Closed winterflame closed 6 years ago

winterflame commented 6 years ago

Reported URL

https://www.topcoder-dev.com/members/ghostar/ https://www.topcoder-dev.com/members/ghostar/details/?track=COPILOT&subTrack=COPILOT

Reproduction Steps

  1. login as pshah_manager

  2. open https://www.topcoder-dev.com/members/ghostar/, check copilot fulfillment

  3. go to https://www.topcoder-dev.com/members/ghostar/details/?track=COPILOT&subTrack=COPILOT , observe

Expected Result

copilot fulfillment should be consistent

Actual Result

Not consistent.

Screenshots

c1 c2

Issue Information

Frequency: Always

Device: Mac Book Pro

OS: macOS High Sierra Version 10.13.4 (17E199)

Browser: Firefox 60.0.1 (64-bit)

winterflame commented 6 years ago

@ThomasKranitsas Labels for this issue: PD - Member - Migration Major

ThomasKranitsas commented 6 years ago

Bug Bash - Topcoder-X for Bug Tickets

ThomasKranitsas commented 6 years ago

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

ThomasKranitsas commented 6 years ago

Contest https://www.topcoder.com/challenges/30069499 has been updated - the new changes has been updated for this ticket.

nqviet commented 6 years ago

@ThomasKranitsas : Can you assign me this ticket, I'm going to work on it.

ThomasKranitsas commented 6 years ago

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

nqviet commented 6 years ago

@ThomasKranitsas : The copilot fulfilment value at the member profile page is the raw data from the Redux store: state.COPILOT.fulfilment, and its value in the member profile copilot detail page is formatted by percentileFunc function (memberStats.js:135) before displaying. That function rounds the number to an integer.

My solutions are: Assuming that the server always returns Copilot's Fulfilment value which is already in percentage format (like: 50.0, 80.5, 90.25):

1) We need to change the formating function of Fulfilment in the member copilot detail page so that it doesn't round the value.

2) We'll apply the format function to Fulfilment of the member profile page as same as the member copilot detail page does.

I think (1) should be fine, how about you?

-- The member profile page: /members/ghostar The member copilot detail page: /members/ghostar/details/?track=COPILOT&subTrack=COPILOT

ThomasKranitsas commented 6 years ago

You should show 2 decimal places in all cases. (toFixed(2))

ThomasKranitsas commented 6 years ago

Payment task has been updated: https://software.topcoder.com/review/actions/ViewProjectDetails?pid=30069499