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

Review issue cleanup #89

Closed
jmgasper opened this issue Sep 21, 2018 · 0 comments
Closed

Review issue cleanup #89

jmgasper opened this issue Sep 21, 2018 · 0 comments

Comments

@jmgasper
Copy link
Collaborator

jmgasper commented Sep 21, 2018

From the October challenge 1 review:

1

#66 - Default value should be 24 hours.

See where bug mentions "We should do this 24 hours after the ticket has been closed, to ensure that if the user closed the ticket by accident without setting the appropriate label, they can come back, reopen the ticket, add the label and close it again to process payment. 24 hours should be enough time to catch and rectify the mistake, if needed."

Although you mention this in your submission that you set it to 30*1000 which is 30 second, I had issues testing it with 24 hours even after changing the configuration. The updates did not happen and no retry was triggered in this case

2

#44 - Value should be not be reset if the a user is un-assigned and re-assigned to another user

3

#44 - "Hours assigned" should be shown in 'Bold'
You show it as normal text

4

#43 - Buttons are right aligned for admin, but not for copilot - you should handle the button positions conditionally

5

#43 - #43

ProjectService.js

if (!setting[provider]) {
    throw new errors.ValidationError(`User ${project.copilot} doesn't currently have Topcoder-X access setup for ${provider}. 
    Please have them sign in and set up their ${provider} account with Topcoder-X before adding as copilot`);
  }

Rather than hardcoding the string literals everywhere, you should define it as a constant so it can be used wherever needed

6
 /**
* ensure if current user can update the project
* @param {String} projectId the project id
* @param {String} currentUser the topcoder current user
* @returns {Object} the project detail from database
* @private
*/
async function _ensureEditPermission(projectId, currentUser) {

Method name is confusing - you say that this is to ensure that current user can update the project.

But the method itself is returning the project object.

7

ensureEditPermission -> This same method is present in 2 services with slightly different implementations. There's common code in there which should be abstracted into a util method

jmgasper added a commit that referenced this issue Oct 2, 2018
#89 (major requirement)
#88 (major requirement)
#87 (major requirement)
#86 (major requirement)
#83
#82
#74
#71
#35 (major requirement)
#79 (major requirement)
#76
@jmgasper jmgasper closed this as completed Oct 2, 2018
jmgasper added a commit that referenced this issue Oct 9, 2019
#89 (major requirement)
#88 (major requirement)
#87 (major requirement)
#86 (major requirement)
#83
#82
#74
#71
#35 (major requirement)
#79 (major requirement)
#76
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant