Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
jgillick committed Mar 24, 2021
2 parents 4534d55 + 6ca2812 commit fa42730
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions src/Jira.js
Original file line number Diff line number Diff line change
Expand Up @@ -239,6 +239,8 @@ export default class Jira {

return this.jira.findIssue(ticketId).then((origTicket) => {
const ticket = Object.assign({}, origTicket);
if (!this.config.slack.api || !ticket.fields.reporter)
return ticket;
return this.slack.findUser(ticket.fields.reporter.emailAddress, ticket.fields.reporter.displayName)
.then((slackUser) => {
ticket.slackUser = slackUser;
Expand Down
2 changes: 1 addition & 1 deletion src/template.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ export function getTicketReporters(tickets) {
const reporters = {};

tickets.forEach((ticket) => {
const { email, displayName } = ticket.fields.reporter;
const { email, displayName } = ticket.fields.reporter || [];
if (!reporters[email]) {
reporters[email] = {
email,
Expand Down

0 comments on commit fa42730

Please sign in to comment.