Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feature/deseng745: Updated project definition to add project type multi-select values. #81

Merged
merged 5 commits into from
Nov 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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")}}',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the due diligence but we don't need to update this!

projectTypes : '{{lorem(2, "words")}}',
substitution : 'false',
}
}
Expand Down
Loading