Modify

Opened 14 years ago

Closed 14 years ago

#180 closed enhancement (fixed)

patch allow specific tracs to disable workflow on tickets

Reported by: zac@… Owned by: bas
Priority: minor Milestone: Version 1.2
Component: email2trac Version: 1.0.0
Keywords: Cc:

Description

Here's the patch. It allows individual trac instances to be configured to stop tickets from automatically being reopened on email. It defaults to off:

--- /usr/bin/email2trac 2009-10-03 00:01:24.000000000 +0000
+++ /root/email2zac     2010-02-14 02:50:49.000000000 +0000
@@ -267,6 +267,11 @@
                else:
                        self.IGNORE_TRAC_USER_SETTINGS = 0
 
+               if parameters.has_key('email_triggers_workflow'):
+                       self.EMAIL_TRIGGERS_WORKFLOW = int(parameters['email_tri
ggers_workflow'])
+               else:
+                       self.EMAIL_TRIGGERS_WORKFLOW = 1
+
        def spam(self, message):
                """
                # X-Spam-Score: *** (3.255) BAYES_50,DNS_FROM_AHBL_RHSBL,HTML_
@@ -644,7 +649,7 @@
                # reopen the ticket if it is was closed
                # We must use the ticket workflow framework
                #
-               if tkt['status'] in ['closed']:
+               if tkt['status'] in ['closed'] and self.EMAIL_TRIGGERS_WORKFLOW:
 
                        #print controller.actions['reopen']
                        #

Attachments (0)

Change History (2)

comment:1 Changed 14 years ago by bas

  • Milestone set to Version 1.2
  • Status changed from new to assigned
  • Type changed from defect to enhancement

Thanks for the patch. I will apply it.

comment:2 Changed 14 years ago by bas

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [320]) email2trac.py.in:

Add Comment

Modify Ticket

Change Properties
Action
as closed The owner will remain bas.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.