This repository was archived by the owner on Jan 23, 2025. It is now read-only.
This repository was archived by the owner on Jan 23, 2025. It is now read-only.
LPP updates #2
Closed
Description
Prize
$120
Env
Base branch: develop
Requirements
1. Winner mapping is wrong currently
For inserting into the database, we need to iterate over “prizeSets”. And “total_amount” will be the aggregate of all winners and copilot prizes. The winner member id will come from the “winner” field in payload.
2. Copilot member id
Copilot member detail can fetch from, https://api.topcoder-dev.com/v5/resources?challengeId=<uuid=90b097cb-8ae4-4f1b-a4bd-f21cf58d86aa>&roleId=cfe12b3f-2a24-4639-9d8b-ec86726f76bd
Copilot roll id can hard coded and keep in config i.e. cfe12b3f-2a24-4639-9d8b-ec86726f76bd
Challenge uuid will be available in “message.payload.id”
3. Transaction rollback issue
Correct the logic of rollback, it is not working - https://github.com/topcoder-platform/legacy-payment-processor/blob/develop/src/services/paymentService.js#L41-L55
Sample:
{
"projectId": 16640,
"terms": [
{
"id": "317cd8f9-d66c-4f2a-8774-63c612d99cd4",
"roleId": "732339e7-8e30-49d7-9198-cccf9451e221"
}
],
"task": {
"isTask": true,
"isAssigned": true,
"memberId": "40153932"
},
"typeId": "ecd58c69-238f-43a4-a4bb-d172719b9f31",
"legacyId": 30058243,
"endDate": "2021-02-10T15:52:11.000Z",
"status": "Completed",
"trackId": "9b6fc876-f4d9-4ccb-9dfd-419247628825",
"created": "2021-02-09T15:02:02.900Z",
"updatedBy": "sachin-kumar",
"createdBy": "sachin-kumar",
"name": "sachin-task-13",
"timelineTemplateId": "53a307ce-b4b3-4d6f-b9a1-3741a58f77e6",
"groups": [],
"descriptionFormat": "markdown",
"updated": "2021-02-09T15:52:20.993Z",
"phases": [
{
"phaseId": "6950164f-3c5e-4bdc-abc8-22aaf5a1bd49",
"duration": 86400,
"id": "fba1a172-d5b2-47c4-a7a6-95568c4c3379",
"name": "Submission",
"isOpen": false,
"scheduledStartDate": "2021-02-09T21:22:11+05:30",
"scheduledEndDate": "2021-02-10T15:52:11.000Z",
"actualStartDate": "2021-02-09T21:22:11+05:30",
"actualEndDate": "2021-02-10T15:52:11.000Z"
},
{
"phaseId": "003a4b14-de5d-43fc-9e35-835dbeb6af1f",
"duration": 86400,
"id": "81542738-cd37-4feb-ac28-8c0bca88b576",
"name": "Iterative Review",
"isOpen": false,
"predecessor": "fba1a172-d5b2-47c4-a7a6-95568c4c3379",
"scheduledStartDate": "2021-02-10T15:52:11.000Z",
"scheduledEndDate": "2021-02-11T15:52:11.000Z",
"actualStartDate": "2021-02-10T15:52:11.000Z",
"actualEndDate": "2021-02-11T15:52:11.000Z"
},
{
"phaseId": "ad985cff-ad3e-44de-b54e-3992505ba0ae",
"duration": 86400,
"id": "32ec684b-c74a-4b44-9f82-fdb2a7d862dc",
"name": "Approval",
"isOpen": false,
"predecessor": "81542738-cd37-4feb-ac28-8c0bca88b576",
"scheduledStartDate": "2021-02-11T15:52:11.000Z",
"scheduledEndDate": "2021-02-12T15:52:11.000Z",
"actualStartDate": "2021-02-11T15:52:11.000Z",
"actualEndDate": "2021-02-12T15:52:11.000Z"
}
],
"prizeSets": [
{
"type": "placement",
"prizes": [
{
"type": "USD",
"value": 15
}
]
}
],
"startDate": "2021-02-09T15:52:11.000Z",
"legacy": {
"track": "DEVELOP",
"subTrack": "FIRST_2_FINISH",
"reviewType": "INTERNAL",
"forumId": 0,
"directProjectId": 23678,
"isTask": true
},
"description": "dsfgdgdf",
"id": "8d855998-920e-4a28-8c6e-b132a00a7d5d",
"tags": [
"Google"
],
"winners": [
{
"userId": "40153932",
"handle": "sachin-kumar",
"placement": 1
}
],
"track": "Development",
"type": "Task",
"billingAccountId": 80000639
}
Sample 2 - {
"projectId": 16640,
"terms": [
{
"id": "317cd8f9-d66c-4f2a-8774-63c612d99cd4",
"roleId": "732339e7-8e30-49d7-9198-cccf9451e221"
}
],
"task": {
"isTask": true,
"isAssigned": true,
"memberId": "40153932"
},
"typeId": "ecd58c69-238f-43a4-a4bb-d172719b9f31",
"legacyId": 30058249,
"endDate": "2021-02-10T17:26:13.000Z",
"status": "Completed",
"trackId": "9b6fc876-f4d9-4ccb-9dfd-419247628825",
"created": "2021-02-09T17:25:26.291Z",
"updatedBy": "sachin-kumar",
"createdBy": "sachin-kumar",
"name": "sachin-task-15",
"timelineTemplateId": "53a307ce-b4b3-4d6f-b9a1-3741a58f77e6",
"groups": [],
"descriptionFormat": "markdown",
"updated": "2021-02-09T17:26:28.588Z",
"phases": [
{
"phaseId": "6950164f-3c5e-4bdc-abc8-22aaf5a1bd49",
"duration": 86400,
"id": "61b8a750-c3a0-4fd8-83fc-15100d48fb2a",
"name": "Submission",
"isOpen": false,
"scheduledStartDate": "2021-02-09T22:56:13+05:30",
"scheduledEndDate": "2021-02-10T17:26:13.000Z",
"actualStartDate": "2021-02-09T22:56:13+05:30",
"actualEndDate": "2021-02-10T17:26:13.000Z"
},
{
"phaseId": "003a4b14-de5d-43fc-9e35-835dbeb6af1f",
"duration": 86400,
"id": "afeb6bc8-e9fd-41bc-8cfd-2186bf163002",
"name": "Iterative Review",
"isOpen": false,
"predecessor": "61b8a750-c3a0-4fd8-83fc-15100d48fb2a",
"scheduledStartDate": "2021-02-10T17:26:13.000Z",
"scheduledEndDate": "2021-02-11T17:26:13.000Z",
"actualStartDate": "2021-02-10T17:26:13.000Z",
"actualEndDate": "2021-02-11T17:26:13.000Z"
},
{
"phaseId": "ad985cff-ad3e-44de-b54e-3992505ba0ae",
"duration": 86400,
"id": "3b27bfac-624d-445e-8bbb-ebb45dac3e86",
"name": "Approval",
"isOpen": false,
"predecessor": "afeb6bc8-e9fd-41bc-8cfd-2186bf163002",
"scheduledStartDate": "2021-02-11T17:26:13.000Z",
"scheduledEndDate": "2021-02-12T17:26:13.000Z",
"actualStartDate": "2021-02-11T17:26:13.000Z",
"actualEndDate": "2021-02-12T17:26:13.000Z"
}
],
"prizeSets": [
{
"type": "copilot",
"prizes": [
{
"type": "USD",
"value": 5
}
]
},
{
"type": "placement",
"prizes": [
{
"type": "USD",
"value": 11
}
]
}
],
"startDate": "2021-02-09T17:26:13.000Z",
"legacy": {
"track": "DEVELOP",
"subTrack": "FIRST_2_FINISH",
"reviewType": "INTERNAL",
"forumId": 0,
"directProjectId": 23678,
"isTask": true
},
"description": "dfgdsfgsd",
"id": "7894175a-33cd-47ad-931b-51369893a099",
"tags": [
"AWS"
],
"winners": [
{
"userId": "40153932",
"handle": "sachin-kumar",
"placement": 1
}
],
"track": "Development",
"type": "Task",
"billingAccountId": 80000639
}
Metadata
Metadata
Assignees
Labels
No labels