Modify ↓
Opened 15 years ago
Closed 15 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: ↓ 2 Changed 15 years ago by bas
- Status changed from new to assigned
comment:2 in reply to: ↑ 1 Changed 15 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 15 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 15 years ago by bas
- Milestone set to Release 1.1.0
comment:5 Changed 15 years ago by bas
- Resolution set to fixed
- Status changed from assigned to closed
Note: See
TracTickets for help on using
tickets.
thanks for the fix. Can you try the following patch:
It must be an integer.