Skip to content

Commit

Permalink
Merge pull request #81 from bcgov/feature/deseng745
Browse files Browse the repository at this point in the history
feature/deseng745: Updated project definition to add project type multi-select values.
  • Loading branch information
jareth-whitney authored Nov 25, 2024
2 parents 862f1d1 + 9f150bc commit 6df9a41
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 2 deletions.
3 changes: 2 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
### 1.10.0 Nov 15, 2024
### 1.10.0 Nov 22, 2024
* Modified project definition to accomodate shape file colours. [DESENG-743](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-743)
* Modified project definition to accomodate project type multiselect. [DESENG-745](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-745)

### 1.9.0 Mar 11, 2024
* Add option for contact form on projects [DESENG-373](https://apps.itsm.gov.bc.ca/jira/browse/DESENG-373)
Expand Down
2 changes: 2 additions & 0 deletions api/controllers/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ const tagList = [
'provElecDist',
'shortName',
'projectPhase',
'projectTypes',
'substitution',
'updatedBy',
'projectLead',
Expand Down Expand Up @@ -848,6 +849,7 @@ exports.protectedPut = async (args, res) => {
obj.region = projectObj.region;
obj.shapeFileColour = projectObj.shapeFileColour;
obj.projectPhase = projectObj.projectPhase;
obj.projectTypes = projectObj.projectTypes;
obj.name = projectObj.name;
obj.centroid = projectObj.centroid;
obj.projectLead = projectObj.projectLead;
Expand Down
1 change: 1 addition & 0 deletions api/helpers/models/project.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ const definition = {
provElecDist: { type: String, default: '' },
shortName: { type: String, default: '', index: true },
projectPhase: { type: String, default: '' },
projectTypes: { type: Array, default: [] },
substitution: { type: Boolean, default: false },
projectLead: { type: 'ObjectId', ref: 'User', default: null, index: true },
projectDirector: { type: 'ObjectId', ref: 'User', default: null, index: true },
Expand Down
22 changes: 22 additions & 0 deletions api/swagger/swagger.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ definitions:
- currentPhase
- currentPhaseCode
- currentPhaseName
- projectTypes
- description
- details
- engagementStatus
Expand All @@ -137,6 +138,9 @@ definitions:
- activitiesAndUpdatesEnabled
- contactFormEnabled
- contactFormEmails
enum: &projectTypes
- name
- checked
TopicSortByFields:
type: string
description: "Optional fields to sort by (prefixed with + or - for order)"
Expand Down Expand Up @@ -900,6 +904,15 @@ paths:
type: string
required: false
description: "Get a Project that relates to this Project Phase."
- in: query
collectionFormat: multi
name: projectTypes
type: array
required: false
description: "Get a Project that relates to these project types."
items:
type: string
enum: *projectTypes
- in: query
name: agreements
type: string
Expand Down Expand Up @@ -1016,6 +1029,15 @@ paths:
type: string
required: false
description: "Get a Project that relates to this Project Phase."
- in: query
collectionFormat: multi
name: projectTypes
type: array
required: false
description: "Get a Project that relates to these project types."
items:
type: string
enum: *projectTypes
- in: query
name: agreements
type: string
Expand Down
3 changes: 2 additions & 1 deletion seed/jsongenerator/projectschema
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@
proMember : '{{lorem(1, "words")}}',
provElecDist : '{{lorem(1, "words")}}',
shortName : '{{lorem(1, "words")}}',
projectPhase : '{{lorem(1, "words")}}',
projectPhase : '{{lorem(1, "words")}}',
projectTypes : '{{lorem(2, "words")}}',
substitution : 'false',
}
}
Expand Down

0 comments on commit 6df9a41

Please sign in to comment.