Opened 9 years ago

Closed 9 years ago

Last modified 9 years ago

#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


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 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 9 years ago by anonymous

Is this planned on being fixed? This would make this Macro much better from a usability/manageability stand-point.

comment:2 Changed 9 years ago by anonymous

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 9 years ago by Andrej Tokarčík

Status: newassigned

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 9 years ago by Andrej Tokarčík

Resolution: fixed
Status: assignedclosed

(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 9 years ago by Andrej Tokarčík

By the way, it may be worth noting that the TicketQuery macro does not utilize the 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.

Modify Ticket

Change Properties
Set your email in Preferences
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.