Modify

Opened 14 years ago

Closed 14 years ago

#6451 closed defect (fixed)

Port to 0.12

Reported by: Ryan J Ollos Owned by: Andrej Tokarčík
Priority: normal Component: ProgressMeterMacro
Severity: normal Keywords:
Cc: nulleke76@… Trac Release: 0.12

Description

I've tested this plugin under Trac 0.12dev-r9045.

It works fine when called with no arguments.

[[ProgressMeter]]

However, the following two use cases for the macro result in an error.

ProgressMeter(component=component1)
Error: Macro ProgressMeter(component=component1) failed

dictionary update sequence element #0 has length 1; 2 is required
ProgressMeter(milestone=milestone1)
Error: Macro ProgressMeter(milestone=milestone1) failed

dictionary update sequence element #0 has length 1; 2 is required

I'm willing to try some fixes and do additional testing, but I don't know enough Python to have an idea of what the issue is.

Attachments (0)

Change History (3)

comment:1 Changed 14 years ago by anonymous

Cc: nulleke76@… added; anonymous removed

comment:2 Changed 14 years ago by gregmac

It seems that query.constraints is now wrapped in an array. I just modified this slightly to extract the first element from the array.

Disclaimer: I am neither a python nor trac developer. I have no idea what the query.constraints change was for, why it's now in an array, or what implication that this fix has other than it works with all the macros that I was using in 0.11.

  • progressmeter/macro.py

     
    1515                     group=None):
    1616    def query_href(extra_args):
    1717        args = {grouped_by: group, 'group': 'status'}
    18         args.update(constraints)
     18        args.update(constraints[0])
    1919        args.update(extra_args)
    2020        return req.href.query(args)
    2121    return {'stats': stat,

comment:3 Changed 14 years ago by Andrej Tokarčík

Resolution: fixed
Status: newclosed

(In [8558]) Finally got myself to install Trac 0.12 and to fix #6451, sorry guys I let you wait so long!

Also, the upgrade required some changes to the validation mechanism and so now you can encounter an \'Invalid input!\', specifically if you put format\' or status\' into the params or do something similarly inappropriate.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Andrej Tokarčík.
The resolution will be deleted. Next status will be 'reopened'.

Add Comment


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

 
Note: See TracTickets for help on using tickets.