Modify

Opened 3 years ago

Closed 3 years ago

Last modified 3 years ago

#8763 closed defect (fixed)

ProgressMeterMacro erroring on ~= ^= and $= operators

Reported by: bricesch Owned by: qwp0
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 3 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 3 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 3 years ago by qwp0

  • Status changed from new to 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 3 years ago by qwp0

  • Resolution set to fixed
  • Status changed from assigned to 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 3 years ago by qwp0

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.

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.