Injected Dates for Date Filter not working as expected

  • 1
  • Problem
  • Updated 2 years ago
  • (Edited)
"I've verified that this logic/filter works when the dates are on the same page (@self local reporter).  However, when pulling from Scaffolding from child pages it does not work."

I am trying to create a report for a pie chart that shows all Action Items that were closed within 30 days and ones that took more than 30 days.  There is a field in the Scaffolding to capture the Assigned Date and the Closed Date.  Using the Date Filter I was trying to filter on all the Closed Item's Closed Date that occurred within 30 days after the Assigned Date.  In the Date Filter I was injecting the Assigned Date > shift 30d and finding out if any Action Items closed before the Assigned Date plus the extra 30d.  I've tried so many permutations I lost count.  This approach seem logical, but I don't really care what macros are used as long as it works. ;-)

I also couldn't get the example to work on the date-filter page
"Example - Between two different dates"
https://docs.servicerocket.com/display/REP/date-filter

Reporting 6.4.5
Scaffolding 8.7.11
Confluence 5.8.18

Here is the Storage Format
<ac:structured-macro ac:macro-id="469a589b-a6e0-49bb-b84f-5e8d2d6185c6" ac:name="report-table" ac:schema-version="1">
  <ac:parameter ac:name="injected">true</ac:parameter>
  <ac:rich-text-body>
    <ac:structured-macro ac:macro-id="1a70bac9-4037-4527-963d-8b058d7987ce" ac:name="local-reporter" ac:schema-version="1">
      <ac:parameter ac:name="source">cpit:CPIT Action Item List</ac:parameter>
      <ac:parameter ac:name="">page:children</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="5e6c21ce-7ab4-4a74-bc9a-4dd68bbd47a6" ac:name="date-filter" ac:schema-version="1">
            <ac:parameter ac:name="required">true</ac:parameter>
            <ac:parameter ac:name="">data:CloseDate</ac:parameter>
          </ac:structured-macro> <ac:structured-macro ac:macro-id="26e2b6f0-195b-4a28-8161-94cc97072fc4" ac:name="date-filter" ac:schema-version="1">
            <ac:parameter ac:name="required">true</ac:parameter>
            <ac:parameter ac:name="">data:AssignedDate</ac:parameter>
          </ac:structured-macro>
        </p>
        <ac:structured-macro ac:macro-id="95132801-6778-4a3a-94ce-0f4ffdb15df0" ac:name="date-filter" ac:schema-version="1">
          <ac:parameter ac:name="maxValue">%data:AssignedDate&gt;yyyy-MM-dd&gt;shift 30d&gt;%</ac:parameter>
          <ac:parameter ac:name="format">yyyy-MM-dd</ac:parameter>
          <ac:parameter ac:name="">data:CloseDate &gt; yyyy-MM-dd</ac:parameter>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="1db59356-d8fd-4c48-b0ee-320bb55c742d" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Action</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="5141a784-c78c-4d52-9c62-96a1881b8978" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="">page:title</ac:parameter>
          </ac:structured-macro>
        </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="e44f0bc0-906b-491f-90c5-0fd73b362668" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Assign Date</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="a0f856d0-0a54-440e-b846-67eaf28391d0" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="format">yyyy-MM-dd</ac:parameter>
            <ac:parameter ac:name="">data:AssignedDate</ac:parameter>
          </ac:structured-macro>
        </p>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="3a8f39bc-cb9c-46f7-945c-7344b341ab72" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Closed Date</ac:parameter>
      <ac:rich-text-body>
        <p>
          <ac:structured-macro ac:macro-id="2fdcbdad-ff08-41b1-a990-5391cc3d1983" ac:name="report-info" ac:schema-version="1">
            <ac:parameter ac:name="format">yyyy-MM-dd</ac:parameter>
            <ac:parameter ac:name="">data:CloseDate</ac:parameter>
          </ac:structured-macro>
        </p>
        <p> </p>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="9da2626e-9a9a-48c7-9ea0-fd3f84ecfd1e" ac:name="report-column" ac:schema-version="1">
      <ac:parameter ac:name="title">Days</ac:parameter>
      <ac:rich-text-body>
        <ac:structured-macro ac:macro-id="2e13c358-17c7-4002-9d52-e64ee1ab9608" ac:name="report-eval" ac:schema-version="1">
          <ac:parameter ac:name="default">0</ac:parameter>
          <ac:parameter ac:name="format">0</ac:parameter>
          <ac:parameter ac:name="atlassian-macro-output-type">BLOCK</ac:parameter>
          <ac:parameter ac:name="">CPITActionCloseDays</ac:parameter>
          <ac:plain-text-body><![CDATA[round((%data:CloseDate >date:at midnight> milliseconds% - %data:AssignedDate >date:at midnight> milliseconds%)/86400000)]]></ac:plain-text-body>
        </ac:structured-macro>
      </ac:rich-text-body>
    </ac:structured-macro>
    <ac:structured-macro ac:macro-id="27d97af5-15bf-45ba-9533-9cd59cb23143" ac:name="report-empty" ac:schema-version="1">
      <ac:rich-text-body>
        <p>Ooops</p>
      </ac:rich-text-body>
    </ac:structured-macro>
  </ac:rich-text-body>
</ac:structured-macro>


this is a sample of the data being reported, the last column is the report eval
Photo of Robert Crain

Robert Crain

  • 35 Posts
  • 4 Reply Likes
  • worn out......

Posted 2 years ago

  • 1

There are no replies.