Using date-filter dates in table-data rows
I have table, called Release plan (using table-data macro) I want to report on. The table contains information about Project Releases such as:
* PlannedFinish
* MilestoneName
* Status
* IssueDetails
I am creating a report and want to only show milestones two weeks back in time and three weeks ahead. I am not sure how this is done because the filter needs to be applied to each row in the table. Here is the code I have, can you help me with this:
{report-block}
{content-reporter:label=myproject|space=TEAMS}
{date-filter:data:Release plan:PlannedFinish |minValue=-3m|maxValue=2w|required=true}
{report-body}
h6. {report-info:data:Project name}
{report-on:data:Release plan}
* *{report-info:data:ProjectStatus|render=wiki|default={color:silver}Not started{color} } {report-info:data:PlannedFinish|format=dd MMMMM yyyy |render=wiki|default=Unknown} - {report-info:data:MilestoneName|render=wiki}* released, for more details see: {report-info:data:IssueDetails|render=wiki|default=no link provided}
{report-on}
{report-body}
{report-block}
* PlannedFinish
* MilestoneName
* Status
* IssueDetails
I am creating a report and want to only show milestones two weeks back in time and three weeks ahead. I am not sure how this is done because the filter needs to be applied to each row in the table. Here is the code I have, can you help me with this:
{report-block}
{content-reporter:label=myproject|space=TEAMS}
{date-filter:data:Release plan:PlannedFinish |minValue=-3m|maxValue=2w|required=true}
{report-body}
h6. {report-info:data:Project name}
{report-on:data:Release plan}
* *{report-info:data:ProjectStatus|render=wiki|default={color:silver}Not started{color} } {report-info:data:PlannedFinish|format=dd MMMMM yyyy |render=wiki|default=Unknown} - {report-info:data:MilestoneName|render=wiki}* released, for more details see: {report-info:data:IssueDetails|render=wiki|default=no link provided}
{report-on}
{report-body}
{report-block}
1
person has this question
I have this question, too!
Tell me when someone answers.
The more people who ask this question, the more it gets noticed.
The more people who ask this question, the more it gets noticed.
-
Inappropriate?Without also seeing your Scaffolding markup I'm just guessing, but try something like this:
{report-table}
{expanding-reporter:data:Release plan|as=milestone}
{content-reporter:label=myproject|space=TEAMS}
{content-reporter}
{date-filter:data:PlannedFinish|minValue=-2w|maxValue=+3w|required=true}
{expanding-reporter}
{report-column:title=Project}{report-info:expanded:item > data:Project name}{report-column}
{report-column:title=Status}*{report-info:expanded:milestone > data:ProjectStatus|render=wiki|default={color:silver}Not started{color} }{report-column}
{report-column:title=Planned Finish}{report-info:expanded:milestone > data:PlannedFinish|format=dd MMMMM yyyy |render=wiki|default=Unknown}{report-column}
{report-column:title=Milestone Name}{report-info:expanded:milestone > data:MilestoneName|render=wiki}{report-column}
{report-column:Issue Details}{report-info:expanded:milestone > data:IssueDetails|render=wiki|default=no link provided}{report-column}
{report-empty}_No milestones available._{report-empty}
{report-table}
This will output all milestones within the date range (-2 weeks to +3 weeks), each on it's own row in the table.
A couple of tips:
1. All your projects are children or descendants of a single page (eg 'Projects'), using {local-reporter} will be much more efficient.
2. You might want to sort your results, either by the page title, PlannedFinish date or some other value. Currently the output will be fairly random. -
Inappropriate?Thanks David this help alot ;)
I am having a bit of a problem because I wan to list the Project name and then all milestones, then the next project and all milestones etc. The following image show how I want to display it - but here the datefilter is not in place:

Here is the date filer in place, but I am having a hard time using an reporter inside an reporter - see the current Release plan overview:

Here is the code I am now using, the problem is in displaying the project Name before the report list is printed, but I cant move the Project Name clause outside of the report-body understandably :S
{report-block}
{report-list}
{expanding-reporter:data:Release plan|as=milestone}
{content-reporter:label=stlproject|space=XSTL}
{content-reporter}
{date-filter:data:PlannedFinish|minValue=-6w|maxValue=+3w|required=true}
{expanding-reporter}
{report-body}
h6. {report-info:expanded:item > data:Project name}
*{report-info:expanded:milestone > data:ProjectStatus|render=wiki|default=Not started } {report-info:expanded:milestone > data:PlannedFinish|format=dd MMMMM yyyy |render=wiki|default=Unknown}{report-info:expanded:milestone > data:MilestoneName|render=wiki}* released, for more details see: {report-info:expanded:milestone > data:IssueDetails|render=wiki|default=no link provided}
{report-body}
{report-list}
{report-block}
I’m curious
-
Inappropriate?Hmm. Ok, try something like this:
{report-block}
{content-reporter:label=stlproject|space=XSTL}
{report-body}
h6. {report-info:expanded:item > data:Project name}
{report-list}
{local-reporter:data:Release plan}
{date-filter:data:PlannedFinish|minValue=-6w|maxValue=+3w|required=true}
{local-reporter}
{report-body-1}
*{report-info:data:ProjectStatus|render=wiki|default=Not started } {report-info:data:PlannedFinish|format=dd MMMMM yyyy |render=wiki|default=Unknown}{report-info:data:MilestoneName|render=wiki}* released, for more details see: {report-info:data:IssueDetails|render=wiki|default=no link provided}
{report-body-1}
{report-list}
{report-body}
{report-block}
The main trick with 'reports-inside-reports' is that you can't have the same macro inside another macro with the same name. In this case, {report-body} is the problem, since you need to have one inside the {report-list} which is already inside a {report-body}. For this reason, there are 'alias' macros with '-1', '-2', etc, which are exactly the same macro with a different name so you can nest them.
1 person says
this answers the question
-
Inappropriate?Thanks for tip David - really powerful stuff you creating here - love this ;)
I’m excited
Loading Profile...



EMPLOYEE