File tree 3 files changed +6
-6
lines changed
3 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,7 @@ module.exports = function(sequelize, DataTypes) {
57
57
/*
58
58
* @Co -pilots should be able to view projects any of the following conditions are met:
59
59
* 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
61
61
* @param userId the id of user
62
62
*/
63
63
getProjectIdsForCopilot : function ( userId ) {
@@ -66,7 +66,7 @@ module.exports = function(sequelize, DataTypes) {
66
66
$or : [
67
67
[ 'EXISTS(SELECT * FROM "project_members" WHERE "deletedAt" IS NULL AND "projectId" = "Project".id AND "userId" = ? )' , userId ] ,
68
68
[ '"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 ]
70
70
]
71
71
} ,
72
72
attributes :[ 'id' ] ,
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ describe('Project Members', () => {
43
43
billingAccountId : 1 ,
44
44
name : 'test2' ,
45
45
description : 'test project2' ,
46
- status : 'active ' ,
46
+ status : 'reviewed ' ,
47
47
details : { } ,
48
48
createdBy : 1 ,
49
49
updatedBy : 1
@@ -170,7 +170,7 @@ describe('Project Members', () => {
170
170
})
171
171
})
172
172
*/
173
-
173
+
174
174
it ( 'should return 201 and register copilot member' , done => {
175
175
var mockHttpClient = _ . merge ( testUtil . mockHttpClient , {
176
176
post : ( ) => Promise . resolve ( {
Original file line number Diff line number Diff line change @@ -79,7 +79,7 @@ describe('LIST Project', () => {
79
79
billingAccountId : 1 ,
80
80
name : 'test2' ,
81
81
description : 'test project3' ,
82
- status : 'active ' ,
82
+ status : 'reviewed ' ,
83
83
details : { } ,
84
84
createdBy : 1 ,
85
85
updatedBy : 1
@@ -137,7 +137,7 @@ describe('LIST Project', () => {
137
137
} )
138
138
} )
139
139
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 => {
141
141
request ( server )
142
142
. get ( '/v4/projects' )
143
143
. set ( {
You can’t perform that action at this time.
0 commit comments