Modify

Opened 12 years ago

Closed 12 years ago

#157 closed defect (fixed)

workflow option is ignored (patch)

Reported by: thomas.moschny@… Owned by: bas
Priority: major Milestone: Release 1.1.0
Component: email2trac Version: 1.0.0
Keywords: Cc:

Description

In order to avoid closed tickets being reopened by email2trac, I configured 'workflow: leave', but that didn't work at first. The following patch was needed.

--- email2trac-1.0.0/email2trac.py.in.orig	2009-09-02 10:57:42.000000000 +0200
+++ email2trac-1.0.0/email2trac.py.in	2009-10-21 15:40:53.000000000 +0200
@@ -660,7 +660,7 @@ class TicketEmailParser(object):
 			#b = controller.get_ticket_changes(req, tkt, 'reopen')
 			#print 'get_ticket_changes :', b
 
-			if self.WORKFLOW and (self.VERSION in ['0.11']) :
+			if self.WORKFLOW and self.VERSION == 0.11:
 				from trac.ticket.default_workflow import ConfigurableTicketWorkflow
 				from trac.test import Mock, MockPerm
 

In the long run, it might be a better idea to turn self.VERSION into a string.

Attachments (0)

Change History (5)

comment:1 follow-up: Changed 12 years ago by bas

  • Status changed from new to assigned

thanks for the fix. Can you try the following patch:

if self.WORKFLOW and (self.VERSION in [0.11]) :

It must be an integer.

comment:2 in reply to: ↑ 1 Changed 12 years ago by thomas.moschny@…

Replying to bas:

thanks for the fix. Can you try the following patch:

if self.WORKFLOW and (self.VERSION in [0.11]) :

Yes, that also works.

It must be an integer.

Why's that? If sorting is an issue, any variant of natsort works, or distutils.version.

comment:3 Changed 12 years ago by bas

email2trac supports different version of Trac and we use this to determine which API function must be used for the different trac version. It use a lot in the code.

comment:4 Changed 12 years ago by bas

  • Milestone set to Release 1.1.0

comment:5 Changed 12 years ago by bas

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

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

  • workflow patch, did not work, closes #157
  • When i ticket is updated we did supply all need fields, like ticket change number, closes #156

debian/changelog:

  • new list of changes

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.