Skip to content

Commit c31d278

Browse files
authored
Merge pull request #407 from topcoder-platform/dev
[PROD] Next Release
2 parents f2e914e + 1c1ab57 commit c31d278

24 files changed

+1092
-65
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@ web_modules/
7474
# dotenv environment variables file
7575
.env
7676
.env.test
77+
taas-es-processor.env
7778

7879
# parcel-bundler cache (https://parceljs.org/)
7980
.cache

README.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ To be able to change and test `taas-es-processor` locally you can follow the nex
220220
| `npm run cov` | Code Coverage Report. |
221221
| `npm run migrate` | Run any migration files which haven't run yet. |
222222
| `npm run migrate:undo` | Revert most recent migration. |
223-
| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" |
223+
| `npm run demo-payment-scheduler` | Create 1000 Work Periods Payment records in with status "scheduled" and various "amount" |
224+
| `npm run emsi-mapping` | mapping EMSI tags to topcoder skills |
224225
225226
## Import and Export data
226227
@@ -334,3 +335,8 @@ When we add, update or delete models and/or endpoints we have to make sure that
334335
- **DB Migration**
335336
- If there are any updates in DB schemas, create a DB migration script inside `migrations` folder which would make any necessary updates to the DB schema.
336337
- Test, that when we migrate DB from the previous state using `npm run migrate`, we get exactly the same DB schema as if we create DB from scratch using command `npm run init-db force`.
338+
339+
## EMSI mapping
340+
mapping EMSI tags to topcoder skills
341+
Run `npm run emsi-mapping` to create the mapping file
342+
It will take about 15 minutes to create the mapping file `script/emsi-mapping/emsi-skils-mapping.js`

config/default.js

+12
Original file line numberDiff line numberDiff line change
@@ -214,5 +214,17 @@ module.exports = {
214214
FIX_DELAY_STEP_ASSIGN_MEMBER: parseInt(process.env.PAYMENT_PROCESSING_FIX_DELAY_STEP_ASSIGN_MEMBER || process.env.PAYMENT_PROCESSING_FIX_DELAY_STEP || 500),
215215
// the fix delay after step of activate challenge, unit: ms
216216
FIX_DELAY_STEP_ACTIVATE_CHALLENGE: parseInt(process.env.PAYMENT_PROCESSING_FIX_DELAY_STEP_ACTIVATE_CHALLENGE || process.env.PAYMENT_PROCESSING_FIX_DELAY_STEP || 500)
217+
},
218+
// if a job reach this critier, system will automatically withdrawn other job applications.
219+
JOBS_HOUR_PER_WEEK: 20,
220+
// the mapping includes the status transformation when auto-withdrawn feature is performed on job candidates.
221+
WITHDRAWN_STATUS_CHANGE_MAPPING: {
222+
applied: 'withdrawn-prescreen',
223+
'skills-test': 'withdrawn-prescreen',
224+
'phone-screen': 'withdrawn-prescreen',
225+
open: 'withdrawn',
226+
interview: 'withdrawn',
227+
selected: 'withdrawn',
228+
offered: 'withdrawn'
217229
}
218230
}

data/demo-data.json

+7-1
Original file line numberDiff line numberDiff line change
@@ -7732,6 +7732,9 @@
77327732
"global": 50,
77337733
"offShore": 10,
77347734
"inCountry": 20,
7735+
"niche": 50,
7736+
"rate20Niche": 20,
7737+
"rate30Niche": 10,
77357738
"rate20Global": 20,
77367739
"rate30Global": 20,
77377740
"rate20OffShore": 35,
@@ -7743,6 +7746,9 @@
77437746
"global": 25,
77447747
"offShore": 5,
77457748
"inCountry": 15,
7749+
"niche": 50,
7750+
"rate20Niche": 20,
7751+
"rate30Niche": 10,
77467752
"rate20Global": 20,
77477753
"rate30Global": 20,
77487754
"rate20OffShore": 35,
@@ -7762,4 +7768,4 @@
77627768
"updatedAt": "2021-05-27T21:43:09.342Z"
77637769
}
77647770
]
7765-
}
7771+
}

docs/Topcoder-bookings-api.postman_collection.json

+233-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"info": {
3-
"_postman_id": "87477d86-2d08-40b6-93c6-99a394193e28",
3+
"_postman_id": "0bd597ba-4bc2-4ea1-be33-45776b80c1ce",
44
"name": "Topcoder-bookings-api",
55
"schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json"
66
},
@@ -11647,6 +11647,11 @@
1164711647
"key": "projectIds",
1164811648
"value": "111, 16705",
1164911649
"disabled": true
11650+
},
11651+
{
11652+
"key": "billingAccountId",
11653+
"value": "0",
11654+
"disabled": true
1165011655
}
1165111656
]
1165211657
}
@@ -11725,6 +11730,11 @@
1172511730
"key": "status",
1172611731
"value": "assigned",
1172711732
"disabled": true
11733+
},
11734+
{
11735+
"key": "billingAccountId",
11736+
"value": "0",
11737+
"disabled": true
1172811738
}
1172911739
]
1173011740
}
@@ -11797,6 +11807,11 @@
1179711807
{
1179811808
"key": "sortOrder",
1179911809
"value": "desc"
11810+
},
11811+
{
11812+
"key": "billingAccountId",
11813+
"value": "0",
11814+
"disabled": true
1180011815
}
1180111816
]
1180211817
}
@@ -11867,6 +11882,11 @@
1186711882
{
1186811883
"key": "sortOrder",
1186911884
"value": "desc"
11885+
},
11886+
{
11887+
"key": "billingAccountId",
11888+
"value": "0",
11889+
"disabled": true
1187011890
}
1187111891
]
1187211892
}
@@ -12537,6 +12557,218 @@
1253712557
},
1253812558
"response": []
1253912559
},
12560+
{
12561+
"name": "search resource bookings with parameters 13",
12562+
"event": [
12563+
{
12564+
"listen": "test",
12565+
"script": {
12566+
"exec": [
12567+
"pm.test('Status code is 200', function () {\r",
12568+
" pm.response.to.have.status(200);\r",
12569+
"});"
12570+
],
12571+
"type": "text/javascript"
12572+
}
12573+
}
12574+
],
12575+
"request": {
12576+
"method": "GET",
12577+
"header": [
12578+
{
12579+
"key": "Authorization",
12580+
"type": "text",
12581+
"value": "Bearer {{token_bookingManager}}"
12582+
}
12583+
],
12584+
"url": {
12585+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.startDate=2021-01-03&workPeriods.isFirstWeek=true",
12586+
"host": [
12587+
"{{URL}}"
12588+
],
12589+
"path": [
12590+
"resourceBookings"
12591+
],
12592+
"query": [
12593+
{
12594+
"key": "fields",
12595+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12596+
},
12597+
{
12598+
"key": "billingAccountId",
12599+
"value": "80000071"
12600+
},
12601+
{
12602+
"key": "workPeriods.startDate",
12603+
"value": "2021-01-03"
12604+
},
12605+
{
12606+
"key": "workPeriods.isFirstWeek",
12607+
"value": "true"
12608+
}
12609+
]
12610+
}
12611+
},
12612+
"response": []
12613+
},
12614+
{
12615+
"name": "search resource bookings with parameters 14",
12616+
"event": [
12617+
{
12618+
"listen": "test",
12619+
"script": {
12620+
"exec": [
12621+
"pm.test('Status code is 200', function () {\r",
12622+
" pm.response.to.have.status(200);\r",
12623+
"});"
12624+
],
12625+
"type": "text/javascript"
12626+
}
12627+
}
12628+
],
12629+
"request": {
12630+
"method": "GET",
12631+
"header": [
12632+
{
12633+
"key": "Authorization",
12634+
"type": "text",
12635+
"value": "Bearer {{token_bookingManager}}"
12636+
}
12637+
],
12638+
"url": {
12639+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.startDate=2021-02-07&workPeriods.isLastWeek=true",
12640+
"host": [
12641+
"{{URL}}"
12642+
],
12643+
"path": [
12644+
"resourceBookings"
12645+
],
12646+
"query": [
12647+
{
12648+
"key": "fields",
12649+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12650+
},
12651+
{
12652+
"key": "billingAccountId",
12653+
"value": "80000071"
12654+
},
12655+
{
12656+
"key": "workPeriods.startDate",
12657+
"value": "2021-02-07"
12658+
},
12659+
{
12660+
"key": "workPeriods.isLastWeek",
12661+
"value": "true"
12662+
}
12663+
]
12664+
}
12665+
},
12666+
"response": []
12667+
},
12668+
{
12669+
"name": "search resource bookings with parameters 15",
12670+
"event": [
12671+
{
12672+
"listen": "test",
12673+
"script": {
12674+
"exec": [
12675+
"pm.test('Status code is 400', function () {\r",
12676+
" pm.response.to.have.status(400);\r",
12677+
" const response = pm.response.json()\r",
12678+
" pm.expect(response.message).to.eq(\"Cannot filter by \\\"isLastWeek\\\" without \\\"startDate\\\"\")\r",
12679+
"});"
12680+
],
12681+
"type": "text/javascript"
12682+
}
12683+
}
12684+
],
12685+
"request": {
12686+
"method": "GET",
12687+
"header": [
12688+
{
12689+
"key": "Authorization",
12690+
"type": "text",
12691+
"value": "Bearer {{token_bookingManager}}"
12692+
}
12693+
],
12694+
"url": {
12695+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.isLastWeek=true",
12696+
"host": [
12697+
"{{URL}}"
12698+
],
12699+
"path": [
12700+
"resourceBookings"
12701+
],
12702+
"query": [
12703+
{
12704+
"key": "fields",
12705+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12706+
},
12707+
{
12708+
"key": "billingAccountId",
12709+
"value": "80000071"
12710+
},
12711+
{
12712+
"key": "workPeriods.isLastWeek",
12713+
"value": "true"
12714+
}
12715+
]
12716+
}
12717+
},
12718+
"response": []
12719+
},
12720+
{
12721+
"name": "search resource bookings with parameters 16",
12722+
"event": [
12723+
{
12724+
"listen": "test",
12725+
"script": {
12726+
"exec": [
12727+
"pm.test('Status code is 400', function () {\r",
12728+
" pm.response.to.have.status(400);\r",
12729+
" const response = pm.response.json()\r",
12730+
" pm.expect(response.message).to.eq(\"Cannot filter by \\\"isFirstWeek\\\" without \\\"startDate\\\"\")\r",
12731+
"});"
12732+
],
12733+
"type": "text/javascript"
12734+
}
12735+
}
12736+
],
12737+
"request": {
12738+
"method": "GET",
12739+
"header": [
12740+
{
12741+
"key": "Authorization",
12742+
"type": "text",
12743+
"value": "Bearer {{token_bookingManager}}"
12744+
}
12745+
],
12746+
"url": {
12747+
"raw": "{{URL}}/resourceBookings?fields=id,startDate,endDate,billingAccountId,workPeriods&billingAccountId=80000071&workPeriods.isFirstWeek=true",
12748+
"host": [
12749+
"{{URL}}"
12750+
],
12751+
"path": [
12752+
"resourceBookings"
12753+
],
12754+
"query": [
12755+
{
12756+
"key": "fields",
12757+
"value": "id,startDate,endDate,billingAccountId,workPeriods"
12758+
},
12759+
{
12760+
"key": "billingAccountId",
12761+
"value": "80000071"
12762+
},
12763+
{
12764+
"key": "workPeriods.isFirstWeek",
12765+
"value": "true"
12766+
}
12767+
]
12768+
}
12769+
},
12770+
"response": []
12771+
},
1254012772
{
1254112773
"name": "put resource booking with booking manager",
1254212774
"event": [

0 commit comments

Comments
 (0)