#8763 closed defect (fixed)
ProgressMeterMacro erroring on ~= ^= and $= operators
Reported by: | Brice Schieltz | Owned by: | Andrej Tokarčík |
---|---|---|---|
Priority: | normal | Component: | ProgressMeterMacro |
Severity: | normal | Keywords: | |
Cc: | Trac Release: | 0.11 |
Description
ProgressMeterMacro (r9775 with Trac 0.12.1) does not work with the ~=, = , and $= operators:
ProgressMeter(milestone^=milestone1)? results in error:
Error: Macro ProgressMeter?(milestone=milestone1) failed Invalid input!
The =~, =, and =$ operators do appear to work for the ProgressMeterMacro.
The operators work in both formats for the TicketQuery Macro (and so it should for ProgressMeterMacro).
Note: it seems that if the macro.py call to parse_args is sent with the strict=False parm, then the operators work both ways. We have not done extensive testing with this parameter.
Attachments (0)
Change History (5)
comment:1 Changed 14 years ago by
comment:2 Changed 14 years ago by
As a workaround, it has been discovered that the following works: ProgressMeter(milestone=^ProjectX)? ProgressMeter(milestone=~ProjectX)? ProgressMeter(milestone=$ProjectX)?
In summary:
Use =, =~, or =$ instead of =, ~=, $=
comment:3 Changed 13 years ago by
Status: | new → assigned |
---|
Will have a look into it soon, mainly to see how the strict
argument behaves across various Trac versions.
In the meantime, use the proposed workaround, or patch ProgressMeterMacro manually if you consider it appropriate and it doesn't yield any weird results -- in case it does, please let me know.
comment:4 Changed 13 years ago by
Resolution: | → fixed |
---|---|
Status: | assigned → closed |
(In [10381]) ProgressMeterMacro: a regression slipped into the 0.12 version of the macro, parse_args()
was being called with strict evaluation enabled, now fixed; closes #8763.
comment:5 Changed 13 years ago by
By the way, it may be worth noting that the TicketQuery macro does not utilize the trac.wiki.api.parse_args
function to parse its arguments, but it implements a method of its own with similar functionality instead, and thus it's possible that TicketQuery and ProgressMeterMacro end up behaving differently just because they don't share the code base to this end.
Is this planned on being fixed? This would make this Macro much better from a usability/manageability stand-point.