Skip to content

Commit

Permalink
Merge pull request #3862 from bcgov/NDT-762-GeographicID-in-XlS-downl…
Browse files Browse the repository at this point in the history
…oad-has-one-row-not-comma-separated

fix: commas on geo names and ids
  • Loading branch information
ccbc-service-account authored Feb 12, 2025
2 parents 01f3450 + 9ea087c commit 2bf58b1
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 7 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
## [1.243.3](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.243.2...v1.243.3) (2025-02-12)

### Bug Fixes

- commas on geo names and ids ([7c680f2](https://github.com/bcgov/CONN-CCBC-portal/commit/7c680f23d910a838d637d60a1316099c9f0ca21e))

## [1.243.2](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.243.1...v1.243.2) (2025-02-12)

## [1.243.1](https://github.com/bcgov/CONN-CCBC-portal/compare/v1.243.0...v1.243.1) (2025-02-12)
Expand Down
9 changes: 5 additions & 4 deletions app/backend/lib/dashboard/dashboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -342,10 +342,11 @@ export const generateDashboardExport = async (applicationData, cbcData) => {
{ value: `${summaryData?.formData?.locations?.regionalDistricts || ''}` },
// geographic names
{
value: `${benefitingCommunitiesNames.join(',')} ${benefitingIndigenousCommunitiesNames.join(',')}`,
value: `${benefitingCommunitiesNames.length > 0 ? benefitingCommunitiesNames.join(',') : ''}${benefitingIndigenousCommunitiesNames.length > 0 ? (benefitingCommunitiesNames.length > 0 ? ',' : '') + benefitingIndigenousCommunitiesNames.join(',') : ''}`,
},
// geo ids
{
value: `${benefitingCommunitiesIds.join(',')} ${benefitingIndigenousCommunitiesIds.join(',')}`,
value: `${benefitingCommunitiesIds.length > 0 ? benefitingCommunitiesIds.join(',') : ''}${benefitingIndigenousCommunitiesIds.length > 0 ? (benefitingCommunitiesIds.length > 0 ? ',' : '') + benefitingIndigenousCommunitiesIds.join(',') : ''}`,
},
// total communities and locales
{ value: summaryData?.formData?.counts?.communities || '' },
Expand Down Expand Up @@ -533,9 +534,9 @@ export const generateDashboardExport = async (applicationData, cbcData) => {
// regional district
{ value: communities.regionalDistricts },
// geographic names
{ value: communities.bcGeographicNames },
{ value: communities.bcGeographicNames.join(',') },
// geo ids
{ value: communities.bcGeographicIds },
{ value: communities.bcGeographicIds.join(',') },
// total communities and locales
{ value: communities.totalCount },
// indigenous communities
Expand Down
4 changes: 2 additions & 2 deletions app/tests/backend/lib/dashboard/dashboard.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,8 +72,8 @@ describe('Dashboard export functions', () => {
null,
'Vancouver Island and Coast',
'Regional District of Mount Waddington',
'Echo Bay Gwayasdums 1',
'26059 65365',
'Echo Bay,Gwayasdums 1',
'26059,65365',
2,
1,
635,
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "CONN-CCBC-portal",
"version": "1.243.2",
"version": "1.243.3",
"main": "index.js",
"repository": "https://github.com/bcgov/CONN-CCBC-portal.git",
"author": "Romer, Meherzad CITZ:EX <[email protected]>",
Expand Down

0 comments on commit 2bf58b1

Please sign in to comment.