[Notice] Announcing the End of Demo Server [Read me]

issue: Fix moved issue's mail message
@ac5cb540aaec32e0133b44e866e3b91179346d5f
--- app/controllers/IssueApp.java
+++ app/controllers/IssueApp.java
... | ... | @@ -665,11 +665,16 @@ |
665 | 665 |
} |
666 | 666 |
} |
667 | 667 |
|
668 |
- private static void addIssueMovedNotification(Project previous, Issue issue) { |
|
669 |
- if (isRequestedToOtherProject(previous, issue.project)) { |
|
670 |
- NotificationEvent notiEvent = NotificationEvent.afterIssueMoved(previous, issue); |
|
671 |
- IssueEvent.addFromNotificationEvent(notiEvent, issue, UserApp.currentUser().loginId); |
|
668 |
+ private static void addIssueMovedNotification(Project previous, Issue originalIssue, Issue issue) { |
|
669 |
+ if (isRequestedToOtherProject(previous, originalIssue.project)) { |
|
670 |
+ NotificationEvent notiEvent = NotificationEvent.afterIssueMoved(previous, originalIssue); |
|
671 |
+ IssueEvent.addFromNotificationEvent(notiEvent, originalIssue, UserApp.currentUser().loginId); |
|
672 |
+ |
|
673 |
+ play.Logger.debug("addIssueMovedNotification - afterIssueMoved receivers: " + notiEvent.receivers); |
|
672 | 674 |
} |
675 |
+ NotificationEvent notiEvent = NotificationEvent.afterNewIssue(issue); |
|
676 |
+ |
|
677 |
+ play.Logger.debug("addIssueMovedNotification - afterNewIssue receivers: " + notiEvent.receivers); |
|
673 | 678 |
} |
674 | 679 |
|
675 | 680 |
@With(NullProjectCheckAction.class) |
... | ... | @@ -739,7 +744,7 @@ |
739 | 744 |
if(isFromMyOwnPrivateProject(previous)){ |
740 | 745 |
issue.history = ""; |
741 | 746 |
} else { |
742 |
- addIssueMovedNotification(previous, issue); |
|
747 |
+ addIssueMovedNotification(previous, originalIssue, issue); |
|
743 | 748 |
} |
744 | 749 |
} else { |
745 | 750 |
addLabels(issue, request()); |
--- app/models/NotificationEvent.java
+++ app/models/NotificationEvent.java
... | ... | @@ -875,9 +875,11 @@ |
875 | 875 |
return receivers; |
876 | 876 |
} |
877 | 877 |
|
878 |
- public static void afterNewIssue(Issue issue) { |
|
879 |
- NotificationEvent.add(forNewIssue(issue, UserApp.currentUser())); |
|
878 |
+ public static NotificationEvent afterNewIssue(Issue issue) { |
|
879 |
+ NotificationEvent notiEvent = forNewIssue(issue, UserApp.currentUser()); |
|
880 |
+ NotificationEvent.add(notiEvent); |
|
880 | 881 |
webhookRequest(NEW_ISSUE, issue, false); |
882 |
+ return notiEvent; |
|
881 | 883 |
} |
882 | 884 |
|
883 | 885 |
public static NotificationEvent forNewIssue(Issue issue, User author) { |
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?