How can I make the taskreport reference to <current page>

This question is in reference to Atlassian Documentation: Task Report Macro

How can I restrict the task report to summazire only those tasks, listed on the same page as the macro is - when I do not know the pagename yet - e.g. for templates or code snippets.

With other macros, there is a placeholder "@self" or "@localspace" available.

 

2 answers

1 accepted

This widget could not be displayed.
Davin Studer Community Champion Aug 04, 2016

Here is what I would do. You will need the Confluence Source Editor. It is free and made by Atlassian. First add a task report macro to your page and set it up the way you want without the page ... we'll get to that in a sec.

image2016-8-4 11:7:45.png

Then open up the source of the page(top right corner of the editor) to grab the storage format for the macro.

image2016-8-4 11:8:44.png

image2016-8-4 11:9:27.png

Select the macro storage format and copy it. The highlighted part in the above image is the page parameter and we are going to create a user macro that will implement the built-in task report macro but will dynamically swap out the page parameter.

Go to Confluence Admin -> User Macros and create a new one. The below user macro definition is based on what you see above. If you want more of the report macro parameters set a certain way then do that before you copy the storage format for creating your user macro ... again we are just going to switch out that one "pages" parameter.

Page Task Report Macro

Macro Name
page_task_report 

Macro Title
Page Task Report 

Description
Whatever you want 

Macro Body Processing
No macro body 

Template

## Developed by: Davin Studer
## Date created: 08/04/2016
## @noparams
 
&lt;ac:structured-macro ac:name="tasks-report-macro"&gt;
    &lt;ac:parameter ac:name="pages"&gt;$content.id&lt;/ac:parameter&gt;
    &lt;ac:parameter ac:name="labels"&gt;Stuff&lt;/ac:parameter&gt;
&lt;/ac:structured-macro&gt;

 

You now have a macro that you can drop into your templates.

Sounds cool - and thanks for your effort to make it a tutorial smile

This widget could not be displayed.

related: https://community.atlassian.com/t5/Confluence-questions/Can-you-add-a-Task-Report-to-a-template-that-shows-all-open/qaq-p/80698

 

Unfortunately, I don't know a solution for this :(

Why is this question marked "solved"?

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Sep 17, 2018 in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

574 views 7 6
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you