#4507 Always notify the person who opened the ticket/PR or are assigned to it
Merged 4 years ago by pingou. Opened 4 years ago by pingou.

file modified
+9 -9
@@ -292,15 +292,6 @@ 

              if comment.user.default_email:

                  emails.add(comment.user.default_email)

  

-     # Add the person that opened the issue/PR

-     if obj.user.default_email:

-         emails.add(obj.user.default_email)

- 

-     # Add the person assigned to the issue/PR

-     if obj.isa in ["issue", "pull-request"]:

-         if obj.assignee and obj.assignee.default_email:

-             emails.add(obj.assignee.default_email)

- 

      # Add public notifications to lists/users set project-wide

      if obj.isa == "issue" and not obj.private:

          for notifs in obj.project.notifications.get("issues", []):
@@ -337,6 +328,15 @@ 

          ),

      )

  

+     # Add the person that opened the issue/PR

+     if obj.user.default_email:

+         emails.add(obj.user.default_email)

+ 

+     # Add the person assigned to the issue/PR

+     if obj.isa in ["issue", "pull-request"]:

+         if obj.assignee and obj.assignee.default_email:

+             emails.add(obj.assignee.default_email)

+ 

      return emails

  

  

6 new commits added

  • Always notify the person who opened the ticket/PR or are assigned to it
  • Catch ImportError before trying to catch any fedora_messaging exceptions
  • Drop all the inline "onclick()" calls
  • Fix typo in the id name: publicnotifications != publicnotificationsb
  • Fix the id vs class in the repo_stats template
  • Move the wait_for_task function down and fix the call to setTimeout
4 years ago

rebased onto d120bfd1e503e2c049f23e5e3c02d029bdb9e824

4 years ago

rebased onto 47a5319

4 years ago

Pull-Request has been merged by pingou

4 years ago