Showing Users Who Are Celebrating Their Birthday Today

Scenario

Using the Report On macro combined with Scaffolding, you are able to extract a set of dates from a Scaffolding table.

This recipe shows you how to display users who are having their birthday today.

Result

 

 

Recipe

Apps

Reporting for Confluence Server & Data Center, Scaffolding Forms & Templates for Confluence Server and Data Center

Apps

Reporting for Confluence Server & Data Center, Scaffolding Forms & Templates for Confluence Server and Data Center

Level

Easy

Estimated time

15 Minutes

Macros

Number Filter, Report On, Report Variable

Suppliers

Date Supplier, Scaffolding Data Supplier, Variable Supplier

Storage format

You can copy and paste this code into the Confluence Source Editor:

<p> <strong>List of Birthdays</strong> </p> <ac:structured-macro ac:macro-id="22439cf5-f14c-4da4-ad06-74d7c6bccc94" ac:name="table-data" ac:schema-version="1"> <ac:parameter ac:name="">birthdayList</ac:parameter> <ac:rich-text-body> <p class="auto-cursor-target"> <br /> </p> <table> <tbody> <tr> <th> <p>Name</p> </th> <th> <p>Birthdate</p> </th> </tr> <tr> <td> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="5cf48023-6c8f-45c7-a822-03bebfd7dba9" ac:name="text-data" ac:schema-version="1"> <ac:parameter ac:name="type">line</ac:parameter> <ac:parameter ac:name="content">text</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:parameter ac:name="">name</ac:parameter> <ac:rich-text-body> <p> <br /> </p> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> </td> <td> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="4aa57614-bd07-465a-b9f7-b57ebb47b766" ac:name="date-data" ac:schema-version="1"> <ac:parameter ac:name="format">dd-MMM-yyyy</ac:parameter> <ac:parameter ac:name="atlassian-macro-output-type">INLINE</ac:parameter> <ac:parameter ac:name="">birthDate</ac:parameter> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> </td> </tr> </tbody> </table> <p class="auto-cursor-target"> <br /> </p> </ac:rich-text-body> </ac:structured-macro> <p> <strong>Who's Celebrating Today?</strong> </p> <ac:structured-macro ac:macro-id="8012bf5a-8a86-4298-aa27-1baf31e95ce5" ac:name="report-on" ac:schema-version="1"> <ac:parameter ac:name="injected">true</ac:parameter> <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="324c9b60-b71c-4a36-be0b-368f8accdc48" 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="42600bb7-8902-4483-87cb-58f442eff515" ac:name="local-reporter" ac:schema-version="1"> <ac:parameter ac:name="">data:birthdayList</ac:parameter> <ac:rich-text-body> <ac:structured-macro ac:macro-id="2683a76a-d0db-4fa3-8f06-4dd705b216ac" ac:name="number-filter" ac:schema-version="1"> <ac:parameter ac:name="minValue">%global:current date &gt; date:MMdd &gt; text:as number%</ac:parameter> <ac:parameter ac:name="maxValue">%global:current date &gt; date:MMdd &gt; text:as number%</ac:parameter> <ac:parameter ac:name="">data:birthDate &gt; date:MMdd &gt; text:as number</ac:parameter> </ac:structured-macro> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p> <ac:structured-macro ac:macro-id="5a3850df-9eec-4dd8-94bb-b1a9144717ac" ac:name="report-body" ac:schema-version="1"> <ac:rich-text-body> <p> <ac:structured-macro ac:macro-id="36a532a5-58a4-46f5-b9c6-d690a87a5ce0" ac:name="report-info" ac:schema-version="1"> <ac:parameter ac:name="separator">comma</ac:parameter> <ac:parameter ac:name="">data:name</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> </ac:rich-text-body> </ac:structured-macro> <p class="auto-cursor-target"> <br /> </p>

Macro structure

You can recreate the example in the editor view:

 

Steps

  • N/A

Line-by-Line Explanation

  • N/A