Modify

Opened 6 years ago

Closed 6 years ago

#8909 closed enhancement (fixed)

needs updates for 0.13dev

Reported by: jayen Owned by: Russ Tyndall
Priority: normal Component: NeverNotifyUpdaterPlugin
Severity: normal Keywords:
Cc: Trac Release: 0.12

Description

this is a patch my friend sent me:

Index: 0.12/nevernotifyupdaterplugin/api.py
===================================================================
--- 0.12/nevernotifyupdaterplugin/api.py        (revision 10321)
+++ 0.12/nevernotifyupdaterplugin/api.py        (working copy)
@@ -28,20 +28,21 @@
         domain = ''
         if defaultDomain: domain = '@'+defaultDomain

-        cursor = self.db.cursor()
-        # Suppress the updater from the recipients
-        updater = None
-        up_em = None
-        cursor.execute("SELECT author FROM ticket_change WHERE ticket=%s "
-                       "ORDER BY time DESC LIMIT 1", (tktid,))
-        for updater, in cursor: break
-        else:
-          cursor.execute("SELECT reporter FROM ticket WHERE id=%s",
-                         (tktid,))
-          for updater, in cursor: break
+        with self.env.db_query as db:
+            cursor = db.cursor()
+            # Suppress the updater from the recipients
+            updater = None
+            up_em = None
+            cursor.execute("SELECT author FROM ticket_change WHERE ticket=%s "
+                           "ORDER BY time DESC LIMIT 1", (tktid,))
+            for updater, in cursor: break
+            else:
+              cursor.execute("SELECT reporter FROM ticket WHERE id=%s",
+                             (tktid,))
+              for updater, in cursor: break

-        cursor.execute("SELECT value FROM session_attribute WHERE name='email' and sid=%s;",(updater,))
-        for up_em, in cursor: break
+            cursor.execute("SELECT value FROM session_attribute WHERE name='email' and sid=%s;",(updater,))
+            for up_em, in cursor: break

         def finder(r):
           if not r:

Attachments (0)

Change History (4)

comment:1 Changed 6 years ago by Russ Tyndall

sorry for the delayed response, I didnt see this ticket

Thanks for the patch, I will get it pushed up in a minute

comment:2 Changed 6 years ago by Russ Tyndall

Resolution: fixed
Status: newclosed

I think i got it all applied correctly, please let me know if you have more troubles. I am still running trac12

http://trac-hacks.org/browser/nevernotifyupdaterplugin/0.13

comment:3 in reply to:  2 Changed 6 years ago by chung.bui.foss@…

Resolution: fixed
Status: closedreopened

Replying to bobbysmith007:

I think i got it all applied correctly, please let me know if you have more troubles. I am still running trac12

http://trac-hacks.org/browser/nevernotifyupdaterplugin/0.13

Dear bobbysmith007, I think the latest revision of the plugin nevernotifyupdater contains an error in line 35, from "self" is not necessary. Please please revise and update patches

comment:4 Changed 6 years ago by Russ Tyndall

Resolution: fixed
Status: reopenedclosed

(In [10745]) removed extra self (thanks! for the bug report) fix #8909

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Russ Tyndall.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.