Skip to content

Commit

Permalink
Merge pull request #7736 from opencrvs/prevent-extra-space-in-person-…
Browse files Browse the repository at this point in the history
…name-notification

fix: prevent extra space in person name in notification content
  • Loading branch information
tahmidrahman-dsi authored Oct 8, 2024
2 parents cb47ef2 + fede711 commit 85bb329
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/trigger-e2e-environment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,8 @@ jobs:
.trim()
.replace(/\s+/g, '-')
.replace(/-+/g, '-')
.substr(0, 35);
.substr(0, 35)
.replace(/[^a-zA-Z0-9]+$/g, '');
}
const result = await github.rest.repos.createDispatchEvent({
owner: 'opencrvs',
Expand Down
2 changes: 1 addition & 1 deletion packages/notification/src/features/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export function getPersonName(
if (!name) {
error(record, `name not found in patient resource for ${compositionCode}`)
}
return [name.given?.join(' '), name.family].join(' ').trim()
return [name.given?.join(' ').trim(), name.family].join(' ').trim()
}

export function getRegistrationLocation(
Expand Down

0 comments on commit 85bb329

Please sign in to comment.