Modify

Opened 5 years ago

Closed 4 years ago

#6451 closed defect (fixed)

Port to 0.12

Reported by: rjollos Owned by: qwp0
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 4 years ago by anonymous

  • Cc nulleke76@… added

comment:2 Changed 4 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 4 years ago by qwp0

  • Resolution set to fixed
  • Status changed from new to 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.

Add Comment

Modify Ticket

Action
as closed .
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.