Changeset 556


Ignore:
Timestamp:
08/15/11 11:40:09 (9 years ago)
Author:
bas
Message:

chamged workflow to TicketModule? implementation as suggested by: Holger Jürgs, see #226

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/email2trac.py.in

    r555 r556  
    701701
    702702        if workflow:
    703        
     703
     704            tkt_module = TicketModule(self.env)
     705            field_changes, problems = tkt_module.get_ticket_changes(req, tkt, workflow)
     706
     707            for field in field_changes.keys():
     708
     709                ## We have already processed these fields
     710                #
     711                if not field in ['reporter', 'summary', 'description']:
     712                    s = 'workflow : %s, field %s : %s, by %s' \
     713                       %(workflow, field, field_changes[field]['new'],field_changes[field]['by'] )
     714                    self.logger.debug(s)
     715
     716                    tkt[field] = field_changes[field]['new']
     717
    704718            ## There can be several workflow implementations
    705719            #
    706             for controller in ticket_system.action_controllers:
     720            #for controller in ticket_system.action_controllers:
    707721           
    708722                ## Not Needed anymore, 9 Aug 2011 BvdV, we already checked the permissions
     
    719733                #
    720734               
    721                 fields = controller.get_ticket_changes(req, tkt, workflow)
    722                 for key in fields.keys():
    723                     self.logger.debug('\t workflow %s %s : %s' %(controller, key, fields[key]))
    724                     tkt[key] = fields[key]
     735                #fields = controller.get_ticket_changes(req, tkt, workflow)
     736                #for key in fields.keys():
     737                #    self.logger.debug('\t workflow %s %s : %s' %(controller, key, fields[key]))
     738                #    tkt[key] = fields[key]
    725739
    726740            return True
Note: See TracChangeset for help on using the changeset viewer.