Opened 8 years ago

Closed 7 years ago

# Port to 0.12

Reported by: Owned by: Ryan J Ollos Andrej Tokarčík normal ProgressMeterMacro normal nulleke76@… 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.

### comment:2 Changed 7 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

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

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

Resolution: → fixed new → closed

(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