You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
I have the Reporting and Scaffolding plugin. I would like to display a certain text or image based on the relative freshness of an article in our Knowledge Base. For example, a green check if it was last modified in the last three months, or a red X if it has been a year since it was modified.
I don't want to filter the content OUT, just warn the reader that it might be old.
I know how to grab the modified date, but I can't figure out:
a) How to evaluate a date in a report.
b) How to put that evaluation into good use.
Hi Rhyne,
That is a very good use case :)
I tried to solve it by using nested reporters (report inside another report) and it worked, here is the storage format (to import it in your Confluence you can follow instructions mentioned in this documentation):
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="073eb22c-8932-42e8-96e6-5dd8c44e5806" ac:name="report-table" ac:schema-version="1">
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="13eefa5e-cdb3-4bb4-b44d-942706bf7564" ac:name="content-reporter" ac:schema-version="1">
<ac:parameter ac:name="types">page,attachment</ac:parameter>
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="87573cb8-2fd3-4920-94f7-735a9becb710" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Icon</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="f7bde38d-d930-45b3-9065-7632a8cabc37" ac:name="report-block" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="64a5ee94-b7ba-4550-8e4a-d3b092e81b82" ac:name="local-reporter" ac:schema-version="1">
<ac:parameter ac:name="">@self</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="88c791bb-a24b-4df8-843d-dbaf72a566fc" ac:name="date-filter" ac:schema-version="1">
<ac:parameter ac:name="afterValue">-3M</ac:parameter>
<ac:parameter ac:name="">content:modification date</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="01a16e1b-4905-4d25-8f71-3be3aa1c21c4" ac:name="report-body" ac:schema-version="1">
<ac:rich-text-body>
<p>
<ac:emoticon ac:name="tick"/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="c112ceff-3f7e-4007-836d-9ba1b3f96071" ac:name="report-empty" ac:schema-version="1">
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="00c67408-d5aa-474f-90df-bdecf4344147" ac:name="report-block" ac:schema-version="1">
<ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter>
<ac:rich-text-body>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="3172835d-4c85-4e6b-90d2-b00fa9aa26dd" ac:name="local-reporter" ac:schema-version="1">
<ac:parameter ac:name="">@self</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="ac187b60-2321-4221-ba3d-f617653667a3" ac:name="date-filter" ac:schema-version="1">
<ac:parameter ac:name="beforeValue">-1y</ac:parameter>
<ac:parameter ac:name="format">dd-MMM-yyyy</ac:parameter>
<ac:parameter ac:name="">content:modification date</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="465c8f0d-a88e-4808-b93e-9794ca6633f5" ac:name="report-body" ac:schema-version="1">
<ac:rich-text-body>
<p>
<ac:emoticon ac:name="cross"/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="2f6ae980-380e-4add-ae64-e5000c978d67" ac:name="report-empty" ac:schema-version="1">
<ac:rich-text-body>
<p>
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="592b3fd8-bf0d-40ad-ab6a-d9cbbb25b092" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Modification Date</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="6bcd9bed-5403-44d9-af08-a964b637b32c" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="">content:modification date</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<ac:structured-macro ac:macro-id="2405939c-dbf2-4f43-8145-11beb6fe6a9c" ac:name="report-column" ac:schema-version="1">
<ac:parameter ac:name="title">Title</ac:parameter>
<ac:rich-text-body>
<p>
<ac:structured-macro ac:macro-id="a63050bb-362b-474a-95bb-f98df65c8562" ac:name="report-info" ac:schema-version="1">
<ac:parameter ac:name="link">true</ac:parameter>
<ac:parameter ac:name="">content:title</ac:parameter>
</ac:structured-macro>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
</ac:rich-text-body>
</ac:structured-macro>
<p class="auto-cursor-target">
<br/>
</p>
<p class="auto-cursor-target">
<br/>
</p>
Results:
And to answer your questions:
a) How to evaluate a date in a report.
You can do that by using date filter macro and this is the full documentation.
b) How to put that evaluation into good use.
You can use nested Reporters to show the output you are interested in, which I used in the above example.
Hope that helps and let me know if you have any questions.
Best,
Sayed
Hi! I'd also love this and don't have any plug ins installed. How do I go about setting this up from nothing? :) thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Karen,
To set up this, you will just need to install Reporting add-on (paid app) which is used for creating the Report and Source Editor add-on (free app) which is used for importing storage formats. After installation, import the above storage format by following this documentation.
You can create more reports and understand how Reporting macros work by going through this documentation and if you ever need help our support team is here for you :)
Best,
Sayed
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Community! We're thrilled to share that Team Calendars for Confluence is now a built-in feature for Confluence Data Center releases 7.11 and beyond. A long time favorite, Team Cale...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.