Opened 9 years ago
Last modified 6 years ago
#11837 closed enhancement
support "optional" parameters in TracReports — at Initial Version
Reported by: | Christian Boos | Owned by: | Christian Boos |
---|---|---|---|
Priority: | normal | Milestone: | 1.3.1 |
Component: | report system | Version: | 1.1dev |
Severity: | normal | Keywords: | |
Cc: | leho@…, trac.edgewall.org@… | Branch: | |
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
Currently if a report uses a user-defined parameter and that parameter is not defined, a warning is displayed (see e.g. {14}).
In case of complex reports with many user-defined parameters, that's a bit unfortunate as it's very easy to cope with missing values in the SQL query, e.g.
... WHERE ($AUTHOR_ IS '' OR author LIKE $AUTHOR_) ...
I propose to consider parameter names ending with "_" to be considered as "optional":
- they don't trigger the warning if left empty
- their name is rendered specially in the Parameters box to show that they're optional (with the example above, it would be:
(AUTHOR)
)
I also made the "foldable" legend use a bigger font size.
Change History (2)
by , 9 years ago
Attachment: | TracReports-optional-parameters.png added |
---|
by , 9 years ago
Attachment: | 0001-TracReports-parameter-names-ending-with-_-become-opt.patch added |
---|
proposed changes on top of r13350
Note:
See TracTickets
for help on using tickets.
example with two optional parameters and a mandatory one