Skip to content

Commit 648c35a

Browse files
author
Parth Shah
committed
fixes #19
1 parent 69546ef commit 648c35a

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

src/models/project.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ module.exports = function(sequelize, DataTypes) {
5757
/*
5858
* @Co-pilots should be able to view projects any of the following conditions are met:
5959
* a. they are registered active project members on the project
60-
* b. any project that is in 'active' state AND does not yet have a co-pilot assigned
60+
* b. any project that is in 'reviewed' state AND does not yet have a co-pilot assigned
6161
* @param userId the id of user
6262
*/
6363
getProjectIdsForCopilot: function(userId) {
@@ -66,7 +66,7 @@ module.exports = function(sequelize, DataTypes) {
6666
$or: [
6767
['EXISTS(SELECT * FROM "project_members" WHERE "deletedAt" IS NULL AND "projectId" = "Project".id AND "userId" = ? )', userId],
6868
['"Project".status=? AND NOT EXISTS(SELECT * FROM "project_members" WHERE "deletedAt" IS NULL AND "projectId" = "Project".id AND "role" = ? )',
69-
PROJECT_STATUS.ACTIVE, PROJECT_MEMBER_ROLE.COPILOT]
69+
PROJECT_STATUS.REVIEWED, PROJECT_MEMBER_ROLE.COPILOT]
7070
]
7171
},
7272
attributes:['id'],

src/routes/projectMembers/create.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe('Project Members', () => {
4343
billingAccountId: 1,
4444
name: 'test2',
4545
description: 'test project2',
46-
status: 'active',
46+
status: 'reviewed',
4747
details: {},
4848
createdBy: 1,
4949
updatedBy: 1
@@ -170,7 +170,7 @@ describe('Project Members', () => {
170170
})
171171
})
172172
*/
173-
173+
174174
it('should return 201 and register copilot member', done => {
175175
var mockHttpClient = _.merge(testUtil.mockHttpClient, {
176176
post: () => Promise.resolve({

src/routes/projects/list.spec.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ describe('LIST Project', () => {
7979
billingAccountId: 1,
8080
name: 'test2',
8181
description: 'test project3',
82-
status: 'active',
82+
status: 'reviewed',
8383
details: {},
8484
createdBy: 1,
8585
updatedBy: 1
@@ -137,7 +137,7 @@ describe('LIST Project', () => {
137137
})
138138
})
139139

140-
it('should return the project when project that is in active state AND does not yet have a co-pilot assigned', done => {
140+
it('should return the project when project that is in reviewed state AND does not yet have a co-pilot assigned', done => {
141141
request(server)
142142
.get('/v4/projects')
143143
.set({

0 commit comments

Comments
 (0)