Is there a way to assign the "current page" in a task report, allowing it to report on all tasks assigned on that page?
We have meeting pages in Confluence, and frequently take the minutes and assign tasks on the page. We want to have a Task Summary report at the bottom of the same page that shows all tasks assigned in that meeting.
I can't create a Task Summary report with "Current Page" as the page. I can use the specific name of the page, however, if we copy the page to use as a template for the next meeting, the Task Report is wrong and need to be manually corrected.
Also, I would like this Task Report to report on all tasks together, as those are what is relevant for this page of work. The Task Status can only be "Incomplete" or "complete" but not both.
This could be done with a user macro that wraps the built-in task report macro and dynamically supplies the page property. See the below user macro.
Macro Name:
task_report_current_page
Macro Title:
Task Report Current Page
Macro Body Processing:
No macro body
Template:
## Developed by: Davin Studer ## Date created: 05/12/2020 ## @param Label:title=Label(s)|type=string|required=false|desc=Only show tasks on pages with this label ## @param Assignees:title=Assigned to|type=username|required=false|multiple=true|desc=Only show tasks assigned to these people ## @param Creators:title=Created by|type=username|required=false|multiple=true|desc=Only show tasks created by these people ## @param Created:title=Created after|type=string|required=false|desc=Only show tasks created on or after this date. Dates must be entered as dd-mm-yyyy. ## @param Status:title=Task status|type=enum|enumValues=complete,incomplete|default=incomplete|desc= ## @param PageSize:title=Number of tasks per page|type=enum|enumValues=10,20,40|default=20|desc= ## @param Columns:title=Columns to display|type=string|required=false|default=description,duedate,assignee,location|desc=Allowed columns are description, duedate, assignee, location, completedate, labels ## @param Sort:title=Sort by|type=enum|enumValues=due date,assignee,page title|default=due date|desc= ## @param Reverse:title=Reverse sort|type=boolean|default=false|desc= #if($paramAssignees && $paramAssignees != "") #set($assignees = $paramAssignees.split(",")) #end #if($paramCreators && $paramCreators != "") #set($creators = $paramCreators.split(",")) #end <ac:structured-macro ac:name="tasks-report-macro" ac:schema-version="1"> <ac:parameter ac:name="pages">$content.id</ac:parameter> #if($paramLabel && $paramLabel != "") <ac:parameter ac:name="labels">$paramLabel</ac:parameter> #end #if($paramAssignees && $paramAssignees != "") <ac:parameter ac:name="assignees"> #foreach($assignee in $assignees) <ri:user ri:userkey="$userAccessor.getUserByName($assignee).key"/> #end </ac:parameter> #end #if($paramCreators && $paramCreators != "") <ac:parameter ac:name="creators"> #foreach($creator in $creators) <ri:user ri:userkey="$userAccessor.getUserByName($creator).key"/> #end </ac:parameter> #end #if($paramCreated && $paramCreated != "") <ac:parameter ac:name="createddateFrom">$paramCreated</ac:parameter> #end <ac:parameter ac:name="status">$paramStatus</ac:parameter> <ac:parameter ac:name="pageSize">$paramPageSize</ac:parameter> #if($paramColumns && $paramColumns != "") <ac:parameter ac:name="columns">$paramColumns</ac:parameter> #end <ac:parameter ac:name="sortBy">$paramSort</ac:parameter> <ac:parameter ac:name="reverseSort">$paramReverse</ac:parameter> </ac:structured-macro>
Thanks for this script. I haven't tried it (I'm not sure how to apply a script as haven't needed them before), but I'm sure it would work.
But wow - that is a lot of work for something that IMO should be built in. Sadly, it looks like the feature request for this was closed. I'll accept your answer as it looks like the best we can do for now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User Macros are created in Confluence Admin -> User Macros. Once you create the user macro you can add it to a page just like you would a regular macro.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Davin Studer Thanks for this script. This will save me a lot of time! I tried it out and it worked perfectly.
Is there a solution to make another macro that will always set the parent page? This will solve all my problems. :)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This would work for showing tasks on parent pages.
## Developed by: Davin Studer ## Date created: 05/12/2020 ## @param Label:title=Label(s)|type=string|required=false|desc=Only show tasks on pages with this label ## @param Assignees:title=Assigned to|type=username|required=false|multiple=true|desc=Only show tasks assigned to these people ## @param Creators:title=Created by|type=username|required=false|multiple=true|desc=Only show tasks created by these people ## @param Created:title=Created after|type=string|required=false|desc=Only show tasks created on or after this date. Dates must be entered as dd-mm-yyyy. ## @param Status:title=Task status|type=enum|enumValues=complete,incomplete|default=incomplete|desc= ## @param PageSize:title=Number of tasks per page|type=enum|enumValues=10,20,40|default=20|desc= ## @param Columns:title=Columns to display|type=string|required=false|default=description,duedate,assignee,location|desc=Allowed columns are description, duedate, assignee, location, completedate, labels ## @param Sort:title=Sort by|type=enum|enumValues=due date,assignee,page title|default=due date|desc= ## @param Reverse:title=Reverse sort|type=boolean|default=false|desc= #set($parentId = $pageManager.getPage($content.id).parent.getContentId().asLong()) #if ($parentId) #if($paramAssignees && $paramAssignees != "") #set($assignees = $paramAssignees.split(",")) #end #if($paramCreators && $paramCreators != "") #set($creators = $paramCreators.split(",")) #end <ac:structured-macro ac:name="tasks-report-macro" ac:schema-version="1"> <ac:parameter ac:name="pages">$parentId</ac:parameter> #if($paramLabel && $paramLabel != "") <ac:parameter ac:name="labels">$paramLabel</ac:parameter> #end #if($paramAssignees && $paramAssignees != "") <ac:parameter ac:name="assignees"> #foreach($assignee in $assignees) <ri:user ri:userkey="$userAccessor.getUserByName($assignee).key"/> #end </ac:parameter> #end #if($paramCreators && $paramCreators != "") <ac:parameter ac:name="creators"> #foreach($creator in $creators) <ri:user ri:userkey="$userAccessor.getUserByName($creator).key"/> #end </ac:parameter> #end #if($paramCreated && $paramCreated != "") <ac:parameter ac:name="createddateFrom">$paramCreated</ac:parameter> #end <ac:parameter ac:name="status">$paramStatus</ac:parameter> <ac:parameter ac:name="pageSize">$paramPageSize</ac:parameter> #if($paramColumns && $paramColumns != "") <ac:parameter ac:name="columns">$paramColumns</ac:parameter> #end <ac:parameter ac:name="sortBy">$paramSort</ac:parameter> <ac:parameter ac:name="reverseSort">$paramReverse</ac:parameter> </ac:structured-macro> #else Cannot show tasks on parent page because this page has no parent. #end
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Wow, thank you for the quick reply! Just tried it out and it worked perfectly!
This community is great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey, I'm following these steps to try and add a custom user macro, however none of the options mentioned in that guide actually exist.
How do I create and apply a custom user macro?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If this option doesn't exist, you are on confluence cloud, where user macros do not exist.
Regards, Dominic
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Does anyone have an idea whether there is any other solution then in Confluence Cloud?
I am making a template, and would like to create in that template a task report of 'current page'. From what I can understand, this is not possible at this moment in the cloud?
Thanks,
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Do anyone here know a solution for show the percentage of completed tasks on a parent page? Would be great!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I have a similar need, we have a few parent pages that need to pull actions from on their specific child pages. Is this also possible? @Davin Studer
Currently I save the new parent page & then go back in and edit the task report to use that page as the location.
Thanks for any help you can provide. :)
EDIT : I found your answer in another thread.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
@Davin Studer would you also be able to post the version of the marco that reports all tasks in the page subtree (child pages, child pages of these, ...) originating from the page where the macro is used?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is done by default if you enter a page it takes also all the children
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.