[Notice] Announcing the End of Demo Server [Read me]
Hyeonjae Park 2018-12-06
issue: Fix moved issue's mail message
@ac5cb540aaec32e0133b44e866e3b91179346d5f
app/controllers/IssueApp.java
--- app/controllers/IssueApp.java
+++ app/controllers/IssueApp.java
@@ -665,11 +665,16 @@
         }
     }
 
-    private static void addIssueMovedNotification(Project previous, Issue issue) {
-        if (isRequestedToOtherProject(previous, issue.project)) {
-            NotificationEvent notiEvent = NotificationEvent.afterIssueMoved(previous, issue);
-            IssueEvent.addFromNotificationEvent(notiEvent, issue, UserApp.currentUser().loginId);
+    private static void addIssueMovedNotification(Project previous, Issue originalIssue, Issue issue) {
+        if (isRequestedToOtherProject(previous, originalIssue.project)) {
+            NotificationEvent notiEvent = NotificationEvent.afterIssueMoved(previous, originalIssue);
+            IssueEvent.addFromNotificationEvent(notiEvent, originalIssue, UserApp.currentUser().loginId);
+
+            play.Logger.debug("addIssueMovedNotification - afterIssueMoved receivers: " + notiEvent.receivers);
         }
+        NotificationEvent notiEvent = NotificationEvent.afterNewIssue(issue);
+
+        play.Logger.debug("addIssueMovedNotification - afterNewIssue receivers: " + notiEvent.receivers);
     }
 
     @With(NullProjectCheckAction.class)
@@ -739,7 +744,7 @@
                     if(isFromMyOwnPrivateProject(previous)){
                         issue.history = "";
                     } else {
-                        addIssueMovedNotification(previous, issue);
+                        addIssueMovedNotification(previous, originalIssue, issue);
                     }
                 } else {
                     addLabels(issue, request());
app/models/NotificationEvent.java
--- app/models/NotificationEvent.java
+++ app/models/NotificationEvent.java
@@ -875,9 +875,11 @@
         return receivers;
     }
 
-    public static void afterNewIssue(Issue issue) {
-        NotificationEvent.add(forNewIssue(issue, UserApp.currentUser()));
+    public static NotificationEvent afterNewIssue(Issue issue) {
+        NotificationEvent notiEvent = forNewIssue(issue, UserApp.currentUser());
+        NotificationEvent.add(notiEvent);
         webhookRequest(NEW_ISSUE, issue, false);
+        return notiEvent;
     }
 
     public static NotificationEvent forNewIssue(Issue issue, User author) {
Add a comment
List