Modify

Opened 13 years ago

Last modified 4 years ago

#9554 new defect

triage problem with action leave BEFORE triaged

Reported by: anonymous Owned by:
Priority: high Component: AdvancedTicketWorkflowPlugin
Severity: normal Keywords:
Cc: angel Trac Release: 0.12

Description

Trac 0.12.2 Ubuntu 10.04 AdvancedTicketWorkflowPlugin 0.11dev-r9962

My workflow is configured to triage the ticket according to ticket type from new to working_(task) or working_(cr). Having a ticket in state new, doing some changes (comments, milestones, doesn't matter what) and using action leave (configured as in default workflow) causes an error in controller.py class TicketWorkflowOpTriage method _new_status, because variables "transistions" and "field" are empty. So the line "value, status = [y.strip() for y in transition.split('->')]" failes because there is nothing to unpack.

   def _new_status(self, ticket, action):
        """Determines the new status"""
        field = self.config.get('ticket-workflow',
                                action + '.triage_field').strip()
        transitions = self.config.get('ticket-workflow',
                                      action + '.triage_split').strip()
        if not field and not transitions:
            return ticket['status']
        else:
            for transition in [x.strip() for x in transitions.split(',')]:
                value, status = [y.strip() for y in transition.split('->')]
                if value == ticket[field].strip():
                    break
            else:
                self.env.log.error("Bad configuration for 'triage' operation in action '%s'" % action)
                status = 'new'
            return status

After adding the "if not field and not transitions:" everthing works fine!

Attachments (0)

Change History (3)

comment:1 Changed 13 years ago by anonymous

Cc: angel added; anonymous removed

comment:2 Changed 9 years ago by ahowell82@…

Thanks this works for the 1.2 version

comment:3 Changed 4 years ago by Ryan J Ollos

Owner: Eli Carter deleted

Modify Ticket

Change Properties
Set your email in Preferences
Action
as new The ticket will remain with no owner.

Add Comment


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

 
Note: See TracTickets for help on using tickets.