Opened 13 years ago

Closed 12 years ago

#226 closed enhancement (fixed)

More versatile workflow : compatibility with AdvancedTicketWorkflowPlugin

Reported by: Frédéric DUARTE <f.duarte@…> Owned by: bas
Priority: major Milestone: New email2trac release 2.4.0
Component: email2trac Version: 1.6.0
Keywords: Cc:


It would be useful to get email2trac aware of the 'workflow' entry of trac.ini's [ticket] section.

It would help to trigger custom workflow operations that are not handled by Trac's ConfigurableTicketWorkflow.

Attachments (0)

Change History (11)

comment:1 Changed 13 years ago by Frédéric DUARTE <f.duarte@…>


We've been using email2trac for a while: great job, Bas !

But we've always been forced to patch it till then. The first reason (out of 2) is that we have a Q&A cycle that implies our customers: we ask them questions, and they answer by email only. Here is the process:

  1. We state the required ticket to need_info with the customer's email as owner, then a Trac notification is sent by email to the customer
  2. The customer answers by email and then:
    1. the answer is added as comment after a custom quote strip (our 2nd mod, waiting for your strip quotes milestone)
    2. the ticket state changes to 'answered'
    3. the owner gets back to the reporter (or better: to its previous owner)

Now, with the new workflow (great!) feature of release 1.6.0 we are pleased to be about to avoid patching the script ... but the point "the owner gets back to the reporter" can not be handled without a patch ... yet.

"the owner gets back to the reporter" can not handled because it is not an operation proposed by Trac's ConfigurableTicketWorkflow. Fortunately it can be handled by AdvancedTicketWorkflowPlugin. Unfortunately, email2trac is not aware of the 'workflow' entry of the [ticket] section of trac.ini.

It would be great to have this feature extension.

Thanks in advance.

comment:2 Changed 13 years ago by bas

  • Status changed from new to assigned
  • Type changed from defect to enhancement

when email2trac is started it read the trac environment and starts all plugins. Is the api different for AdvancedTicketWorkflowPlugin? or must i just another api-function that triggers theAdvancedTicketWorkflowPlugin and if not installed uses the default one. I read that you patch the source can the patched by attached?

comment:3 Changed 13 years ago by Frédéric DUARTE <f.duarte@…>

Sorry, I'm not aware of Trac API or plug-ins, otherwise I would have provided you with an adequate patch.

Our current patch to customize the workflow for our needs just consists of some hard coded actions that are not really pertinent for this ticket. It just looks like the following lines located in the ticket_update() function around line 830:

        if tkt['status'] in ['need_info']:
                fields['cc'] = ''
                fields['owner'] = tkt['reporter']

Anyway, I think that you could get the list of workflow providers from the trac.ini project and use them in ticket_update() the same way you use ConfigurableTicketWorkflow. It should be the same API otherwise developers would not be able to build any custom workflow handlers ;-).

comment:4 Changed 12 years ago by bas

(In [538]) email2trac only used the default workflow. We now use the ticket workflow that is defined in trac.ini, see #226

comment:5 Changed 12 years ago by bas

  • Milestone set to New email2trac release 2.X.X


Can you test this release?

comment:6 Changed 12 years ago by Frédéric DUARTE


I'm gonna check this, ASAIC. Could take few days, but I'll keep you in touch by the end of the month.


comment:7 Changed 12 years ago by bas

(In [545]) added email2trac_workflow function. So we now honor workflow for new tickets and ticket updates, see #252, #226

comment:8 Changed 12 years ago by bas

(In [556]) chamged workflow to TicketModule? implementation as suggested by: Holger Jürgs, see #226

comment:9 Changed 12 years ago by bas

(In [557]) delete obsolete workflow code, see #226

comment:10 Changed 12 years ago by bas

(In [558]) reporter ticket field can also be changed by a workflow, see #226

comment:11 Changed 12 years ago by bas

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

Add Comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.