Skip to content

Commit 8aec9d3

Browse files
committed
fix Issue in the email title when the team name has symbols
1 parent 058d6d0 commit 8aec9d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/common/helper.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1038,7 +1038,7 @@ async function getProjects (currentUser, criteria = {}) {
10381038
message: `response body: ${JSON.stringify(res.body)}`
10391039
})
10401040
const result = _.map(res.body, (item) => {
1041-
return _.pick(item, ['id', 'name', 'invites', 'members'])
1041+
return _.extend(_.pick(item, ['id', 'invites', 'members']), { name: _.unescape(item.name) })
10421042
})
10431043
return {
10441044
total: Number(_.get(res.headers, 'x-total')),
@@ -1195,7 +1195,7 @@ async function getProjectById (currentUser, id) {
11951195
context: 'getProjectById',
11961196
message: `response body: ${JSON.stringify(res.body)}`
11971197
})
1198-
return _.pick(res.body, ['id', 'name', 'invites', 'members'])
1198+
return _.extend(_.pick(res.body, ['id', 'invites', 'members']), { name: _.unescape(res.body.name) })
11991199
} catch (err) {
12001200
if (err.status === HttpStatus.FORBIDDEN) {
12011201
throw new errors.ForbiddenError(

src/eventHandlers/TeamEventHandler.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async function sendNotificationEmail (payload) {
4949
logger.debug({
5050
component: 'TeamEventHandler',
5151
context: 'sendNotificationEmail',
52-
message: `project id: ${payload.project.id} created with jobs: ${_.join(_.map(payload.jobs, 'id'), ',')}`
52+
message: `project id: ${payload.project.id}, subject: ${data.subject}, created with jobs: ${_.join(_.map(payload.jobs, 'id'), ',')}`
5353
})
5454
}
5555

0 commit comments

Comments
 (0)