Topcoder - Support Custom Copilot Fee For Save Draft Challenge Endpoint

Register
Submit a solution
The challenge is finished.

Challenge Overview

Previously, we have implemented logic to support custom copilot fee for challenges in direct app, see http://www.topcoder.com/challenge-details/30057453/?type=develop&noncache=true

The code changes for direct app can be found by  https://github.com/appirio-tech/direct-app/pull/256

For this challenge, we'd like to implement similar logic for the save draft challenge endpoint.
Notes, The logic should be similar as the Launch Challenge Wizard in Direct App, the main part is described as following

- Please add a new optional copilotFee field for the request.
- If copilot is not selected, The Copilot Cost property for the challenge should be properly updated to 0.
- If the copilot is selected,
   - By default, it will fill with the copilot fee from the configuration, if the copilotFee field is not set.
   - In case the copilotFee is set, if the copilot fee entered is same as what from configuration, do nothing (which is the current behavior), otherwise, We'd like to turn "Manual Payments" for copilot resource to true,  and Create a Project Payment For the copilot resource with the amount set to copilot fee

About  Project Payment Management
If you want to use the project payment management component, please use the built jar from direct app.

How To Test
 - Postman scripts in /docs should be updated or new one created for testing the functionality.
 - Please use direct app, online review to activate challenges and automate it through phases.
 - you can check database or login into Online Review to verify the copilot 

Local Setup
- Please follow Build and Run with Docker compose to build and run direct app and online review locally
- Follow the README.md file to build and start the challenge service.

Final Submission Guidelines

- Code change 
- Verification Steps

ELIGIBLE EVENTS:

2017 TopCoder(R) Open

Review style

Final Review

Community Review Board

Approval

User Sign-Off

ID: 30057647