Skip to content

Commit

Permalink
Merge pull request #78 from VISHNUDAS-tunerlabs/hotfix-4.7
Browse files Browse the repository at this point in the history
Hotfix 4.7-mongoDb index
  • Loading branch information
aks30 authored Mar 24, 2022
2 parents 8837638 + c8b3e10 commit c70cc5e
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 8 deletions.
16 changes: 13 additions & 3 deletions models/observations.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
module.exports = {
name: "observations",
schema: {
name: String,
description: String,
name: {
type : String,
index : true
},
description: {
type : String,
index : true
},
createdBy: {
type : String,
index : true
Expand Down Expand Up @@ -53,6 +59,10 @@ module.exports = {
type: String,
index: true
},
userRoleInformation : Object
userRoleInformation : Object,
deleted : {
type : Boolean,
index: true
}
}
};
5 changes: 4 additions & 1 deletion models/surveySubmissions.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,10 @@ module.exports = {
type : Boolean,
index: true
},
surveyInformation: Object,
surveyInformation: {
name: { type: String, index: true },
description: { type: String, index: true }
},
appInformation : Object,
userRoleInformation : Object
}
Expand Down
10 changes: 8 additions & 2 deletions models/surveys.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,14 @@
module.exports = {
name: "surveys",
schema: {
name: String,
description: String,
name: {
type: String,
index: true
},
description: {
type: String,
index: true
},
createdBy: {
type: String,
index: true,
Expand Down
4 changes: 2 additions & 2 deletions module/surveySubmissions/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -457,11 +457,11 @@ module.exports = class SurveySubmissionsHelper {

if ( filter && filter !== "" ) {
if( filter === messageConstants.common.CREATED_BY_ME ) {
matchQuery["$match"]["isAPrivateProgram"] = {
submissionMatchQuery["$match"]["isAPrivateProgram"] = {
$ne : false
};
} else if ( filter === messageConstants.common.ASSIGN_TO_ME ) {
matchQuery["$match"]["isAPrivateProgram"] = false;
submissionMatchQuery["$match"]["isAPrivateProgram"] = false;
}
}

Expand Down

0 comments on commit c70cc5e

Please sign in to comment.