webhook: Fix webhook bug #371 (compensate the defect of ccac98c)
@6b4bc79fbff8806cce5d256fed9c989be117c5d9
--- app/models/Webhook.java
+++ app/models/Webhook.java
... | ... | @@ -352,10 +352,9 @@ |
352 | 352 |
} |
353 | 353 |
|
354 | 354 |
private String buildJsonWithIssueEventDetails(Issue eventIssue, ArrayNode detailFields, ArrayNode attachments, String requestMessage) { |
355 |
- String title = Messages.get(Lang.defaultLang(), "issue.noMilestone"); |
|
356 |
- if (eventIssue.milestone != null) |
|
357 |
- title = eventIssue.milestone.title; |
|
358 |
- detailFields.add(buildTitleValueJSON(Messages.get(Lang.defaultLang(), "notification.type.milestone.changed"), title, true)); |
|
355 |
+ if (eventIssue.milestone != null ) { |
|
356 |
+ detailFields.add(buildTitleValueJSON(Messages.get(Lang.defaultLang(), "notification.type.milestone.changed"), eventIssue.milestone.title, true)); |
|
357 |
+ } |
|
359 | 358 |
detailFields.add(buildTitleValueJSON(Messages.get(Lang.defaultLang(), ""), eventIssue.assigneeName(), true)); |
360 | 359 |
detailFields.add(buildTitleValueJSON(Messages.get(Lang.defaultLang(), "issue.state"), eventIssue.state.toString(), true)); |
361 | 360 |
attachments.add(buildAttachmentJSON(eventIssue.body, detailFields)); |
Add a comment
Delete comment
Once you delete this comment, you won't be able to recover it. Are you sure you want to delete this comment?