Opened 9 years ago

Last modified 6 years ago

#12206 closed defect

ValueError: need more than 1 value to unpack — at Version 1

Reported by: vaden_mohrmann@… Owned by: Eli Carter
Priority: normal Component: AdvancedTicketWorkflowPlugin
Severity: normal Keywords:
Cc: Trac Release: 1.0

Description (last modified by Ryan J Ollos)

I'm using triage and non-triage flow elements much like the documentation example. The triage work fine to split my new ticket into one of two workflows. The non-triage state to resolve the ticket errors at _new_status line 371.

LOCAL VARIABLES

action=u'resolve_cpi'
field=''
self=<advancedworkflow.controller.TicketWorkflowOpTriage object at 0x04DB6F30>
ticket=<trac.ticket.model.Ticket object at 0x04BE5C10>
transition=''
transitions=''
x=''
y=''
[ticket-workflow]
resolve_cpi = new_cpi -> closed_cpi
resolve_cpi.name = resolve cpi
resolve_cpi.operations = set_resolution
resolve_cpi.permissions = TICKET_MODIFY
resolve_cpi.set_resolution = delivered,invalid

The code is checking for the .triage_field for the action (resolve_cpi in this case) and not getting one. There is no check for bad data from the self.config.get calls.

I'm using trac 1.0.2, python 2.7.6, and tried advancedticketworkflowplugin 1.2.0dev and the build under 0.12 source but is said 0.11dev.

My workaround is below but I still blindly trying to split transition:

if ((field <> '') and (transitions <> '')):

            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'

        else:
            transition = self.config.get('ticket-workflow',action).strip()
            value, status = [y.strip() for y in transition.split('->')]

Change History (1)

comment:1 Changed 9 years ago by Ryan J Ollos

Description: modified (diff)
Note: See TracTickets for help on using tickets.