#10979 closed enhancement (fixed)
Allow dynamic variables to be used in a report title and description
| Reported by: | Owned by: | ||
|---|---|---|---|
| Priority: | normal | Milestone: | 1.1.1 |
| Component: | report system | Version: | |
| Severity: | normal | Keywords: | bitesized |
| Cc: | Branch: | ||
| Release Notes: |
Dynamic variables can be used in the report title and description. |
||
| API Changes: |
New function |
||
| Internal Changes: | |||
Description (last modified by )
It would be useful to be able to use dynamic variables in the report title and description. Some use cases for this were discussed in th:#10488. Here are some examples of how it could be used in the title:
- Tickets for $COMPONENT
- $STATUS tickets for milestone $MILESTONE
- Tickets for $USER
Attachments (3)
Change History (15)
comment:1 by , 13 years ago
| Keywords: | bitesized added |
|---|---|
| Milestone: | → next-dev-1.1.x |
comment:2 by , 13 years ago
| Description: | modified (diff) |
|---|
comment:3 by , 13 years ago
follow-up: 5 comment:4 by , 13 years ago
| Owner: | set to |
|---|---|
| Status: | new → assigned |
Looks good. Could you please move the variable-substitution function and the corresponding regexp into trac.util.text? I'm sure we can re-use this.
comment:5 by , 13 years ago
Replying to rblank:
Looks good. Could you please move the variable-substitution function and the corresponding regexp into
trac.util.text?
Sure, thanks for the review. I'll refresh the patch shortly.
comment:6 by , 13 years ago
comment:7 by , 13 years ago
Nitpick: please move the re.compile() out of the function and store it in a global _sub_vars_re variable.
comment:8 by , 13 years ago
Done in latest patch. I positioned the variable just above the function in which it was used since I saw the same done elsewhere in the file.
After this is committed, I'll add a line or two to TracReports#AdvancedReports:DynamicVariables in order to document the feature.
comment:9 by , 13 years ago
| Milestone: | next-dev-1.1.x → 1.1.1 |
|---|
comment:10 by , 13 years ago
| Owner: | changed from to |
|---|
Slightly modified patch applied in [11533] (made sub_vars_re public and used it in the report code, and URL-quoted the values in go_to_report()).
Ryan, I'm reassigning this to you to update TracReports and to add the "Release Notes" field in this ticket. Please close when this is done.
comment:11 by , 13 years ago
| API Changes: | modified (diff) |
|---|---|
| Description: | modified (diff) |
| Release Notes: | modified (diff) |
| Resolution: | → fixed |
| Status: | assigned → closed |
Thanks! TracReports has been updated.
comment:12 by , 13 years ago
I didn't mention the new tester.go_to_report method in the API Changes, but if that should be done just let me know.



Sounds like a good idea.