Changes between Initial Version and Version 1 of Ticket #12206


Ignore:
Timestamp:
Feb 26, 2015, 8:27:16 PM (9 years ago)
Author:
Ryan J Ollos
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #12206 – Description

    initial v1  
    1 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. [[BR]]
     1I'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.
     2
     3LOCAL VARIABLES
     4{{{
     5action=u'resolve_cpi'
     6field=''
     7self=<advancedworkflow.controller.TicketWorkflowOpTriage object at 0x04DB6F30>
     8ticket=<trac.ticket.model.Ticket object at 0x04BE5C10>
     9transition=''
     10transitions=''
     11x=''
     12y=''
     13}}}
    214
    315
    4 
    5 
    6 LOCAL VARIABLES
    7 action=u'resolve_cpi'[[BR]]
    8 field=''[[BR]]
    9 self=<advancedworkflow.controller.TicketWorkflowOpTriage object at 0x04DB6F30>[[BR]]
    10 ticket=<trac.ticket.model.Ticket object at 0x04BE5C10>[[BR]]
    11 transition=''[[BR]]
    12 transitions=''[[BR]]
    13 x=''[[BR]]
    14 y=''[[BR]]
    15 
    16 
    17 
    18 [ticket-workflow][[BR]]
    19 resolve_cpi = new_cpi -> closed_cpi[[BR]]
    20 resolve_cpi.name = resolve cpi[[BR]]
    21 resolve_cpi.operations = set_resolution[[BR]]
    22 resolve_cpi.permissions = TICKET_MODIFY[[BR]]
    23 resolve_cpi.set_resolution = delivered,invalid[[BR]]
    24 
     16{{{#!ini
     17[ticket-workflow]
     18resolve_cpi = new_cpi -> closed_cpi
     19resolve_cpi.name = resolve cpi
     20resolve_cpi.operations = set_resolution
     21resolve_cpi.permissions = TICKET_MODIFY
     22resolve_cpi.set_resolution = delivered,invalid
     23}}}
    2524 
    2625
    27 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.
    28 
     26The 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.
    2927
    3028I'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.
    3129
    3230My workaround is below but I still blindly trying to split transition:
     31{{{#!python
    3332if ((field <> '') and (transitions <> '')):
    34            
     33
    3534            for transition in [x.strip() for x in transitions.split(',')]:
    3635                value, status = [y.strip() for y in transition.split('->')]
     
    4544            transition = self.config.get('ticket-workflow',action).strip()
    4645            value, status = [y.strip() for y in transition.split('->')]
     46}}}