Skip to content

Commit ae2b990

Browse files
authored
Merge pull request #401 from topcoder-platform/roles-milestone18
Roles milestone18 - Med and Low complexity
2 parents fee829a + e53b46d commit ae2b990

File tree

4 files changed

+20
-3
lines changed

4 files changed

+20
-3
lines changed

docs/swagger.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5331,6 +5331,9 @@ components:
53315331
teamDescription:
53325332
type: string
53335333
description: "The description of the team"
5334+
refCode:
5335+
type: string
5336+
description: "Optional referral code"
53345337
positions:
53355338
type: array
53365339
description: "The array of positions"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
const config = require('config')
2+
3+
module.exports = {
4+
up: async (queryInterface, Sequelize) => {
5+
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(100000)})
6+
},
7+
down: async (queryInterface, Sequelize) => {
8+
await queryInterface.changeColumn({ tableName: 'role_search_requests', schema: config.DB_SCHEMA_NAME}, 'job_description', {type: Sequelize.STRING(2000)})
9+
},
10+
}

src/models/RoleSearchRequest.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ module.exports = (sequelize) => {
5555
},
5656
jobDescription: {
5757
field: 'job_description',
58-
type: Sequelize.STRING()
58+
type: Sequelize.STRING(100000)
5959
},
6060
skills: {
6161
type: Sequelize.ARRAY({

src/services/TeamService.js

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -792,7 +792,7 @@ roleSearchRequest.schema = Joi.object()
792792
currentUser: Joi.object(),
793793
data: Joi.object().keys({
794794
roleId: Joi.string().uuid(),
795-
jobDescription: Joi.string().max(2000),
795+
jobDescription: Joi.string().max(100000),
796796
skills: Joi.array().items(Joi.string().uuid().required()),
797797
jobTitle: Joi.string().max(100),
798798
previousRoleSearchRequestId: Joi.string().uuid()
@@ -1036,7 +1036,10 @@ async function createTeam (currentUser, data) {
10361036
description: data.teamDescription,
10371037
type: 'talent-as-a-service',
10381038
details: {
1039-
positions: data.positions
1039+
positions: data.positions,
1040+
utm: {
1041+
code: data.refCode
1042+
}
10401043
}
10411044
}
10421045
// create project with given data
@@ -1072,6 +1075,7 @@ createTeam.schema = Joi.object()
10721075
data: Joi.object().keys({
10731076
teamName: Joi.string().required(),
10741077
teamDescription: Joi.string(),
1078+
refCode: Joi.string(),
10751079
positions: Joi.array().items(
10761080
Joi.object().keys({
10771081
roleName: Joi.string().required(),

0 commit comments

Comments
 (0)