confluence dashboard task report
Asked by Mike Maxson:

I want to create a Confluence Dashboard that displays the Task Report for each user. I do not want to ask users to click on their profile and then select Tasks. I want that display on the dashboard. I opened a ticket CSP-135082 which showed me how to create a new space and then point the Dashboard to the home page of the new space. But that does not allow me to see a Task Report for each user. And a comment by Rachel Robins on this page <https://confluence.atlassian.com/display/AOD/Task+Report+Macro> says that is not possible. I was provided this link C S P - 135082 which contains a comment from Thomas Krause:

added a comment - 28/Oct/14 2:12 PM

Although it's not too complicated to do this yourself with an surrounding user macro or the Reporting plugin, I do also vote for this issue.

Supporting a pseudo @self parameter value makes sense for a lot of macro parameters for spaces, pages and users.

(end of comment by Thomas)

I tried to create a metadata variable on the page but the Task Report field Assignee does not recognize the metadata variable or @self. Thomas says this can be done. Can anyone please tell me how to get the Task Report macro Assignee field to accept a metadata variable or @self or @user or anything that would identify the user so they only see tasks assigned to that user?


Answers:
author: Davin Studer
body: This should work.

```
## @noparams<ac:structured-macro ac:name="tasks-report-macro">	<ac:parameter ac:name="assignees">		$action.getAuthenticatedUser().key	</ac:parameter></ac:structured-macro>
```

**Update --- use the below macro not the one above:**

I somehow didn't include the user key element in the assignees element.

```
## @noparams<ac:structured-macro ac:name="tasks-report-macro">    <ac:parameter ac:name="assignees">        <ri:user ri:userkey="$action.getAuthenticatedUser().key"/>    </ac:parameter></ac:structured-macro>
```

comments: author: Tracy Powell
body: How would you use the sortBy property for this user macro to sort by the completed date? I've tried a bunch of values but none of them seem to work.

```
<ac:parameter ac:name="sortBy">completedate</ac:parameter>
<ac:parameter ac:name="sortBy">completed</ac:parameter>
<ac:parameter ac:name="sortBy">complete</ac:parameter>
```


author: Lukas Gotter _ Meetical
body: For those looking for a solution in 2023, there's an app for that for Confluence/Jira Cloud!

To create Confluence Dashboards that display the Task Reports, you can use [Task Reports for Jira - A Confluence Dashboard Integration.](https://marketplace.atlassian.com/apps/1229490/task-reports-for-jira-confluence-dashboard-gadgets-reports?hosting=cloud&utm_source=atlcom&utm_medium=article&utm_campaign=art_263833&utm_id=newapps)

It allows you to create dynamic and interactive reports to show Confluence tasks.

Here's an example:

![Screenshot 2023-02-07 at 15.29.12.png](https://community.atlassian.com/t5/image/serverpage/image-id/238698iAB2101B4AE393BFD/image-size/large?v=v2&px=999 "Screenshot 2023-02-07 at 15.29.12.png")

Hope this is helpful! Let us know your feedback.


author: Lukas Gotter _ Meetical
body: An Update from 2023!

We've just launched our Codegeist winner. The Task Reports for Jira App allows you to do exactly what Mike originally asked for: Create a Confluence Dashboard that displays the Task Report for each user.

The app is currently free, so give it a try and let us know any feedback!

Here's an example I created to showcase the use case:

![General Screenshots.png](https://community.atlassian.com/t5/image/serverpage/image-id/237437i0CD197C50B1BA470/image-size/large?v=v2&px=999 "General Screenshots.png")

? Get the [Confluence Task Reports for Jira](https://marketplace.atlassian.com/apps/1229490/task-reports-for-jira-confluence-dashboard-gadgets-reports?utm_source=atlcom&utm_medium=article&utm_campaign=art_416106&utm_id=newapps) App on the Marketplace. It's free!

Something we would like to know from you in the community, should we add a 'current user' option so that the report can also be displayed in dynamic context to the current user?

Do you want to use these Reports directly from Confluence as well?


author: Irina_Bel_Stiltsoft_
body: I would like to share the experience of our users that perceive [Talk - Advanced Inline Comments](https://marketplace.atlassian.com/apps/978531/talk-advanced-inline-comments?hosting=datacenter&tab=overview)as tasks. When they mention somebody in the comments, that means this task is assigned to these employees. Every user can build [Talk Report](https://docs.stiltsoft.com/display/public/Talk/Talk+Report), then to overview 'tasks' that are unresolved and where they've been mentioned. They can easily switch to the comment by clicking on the link in the Page column. When a task is done, they can resolve it or archive it on the page to refer to it later. Talk Report includes the following information:

![Talk report.png](https://community.atlassian.com/t5/image/serverpage/image-id/206443i83E7950FA0F9EEA6/image-size/large?v=v2&px=999 "Talk report.png")


author: Andrej Freeze _ greenique
body: Hello Mike,

I'm aware that you have already got a solution for your problem, yet I would like to tell you about a little plugin that has recently been released on the marketplace. It allows you to display tasks for the currently logged on user, in addition to JIRA issues assigned to the one.

In case this might be of interest to you, feel free to check it out. It is called [TaskOne for Confluence](https://marketplace.atlassian.com/plugins/de.greenique.taone/server/overview). If you have any feedback concerning it, we would love to hear about it.

Kind regards,

Andrej Freeze


author: Mike Maxson
body: Hello Davin,

Thank you for the explanation. I always like to know why I do something and not just do it blindly. Mimicing the storage format used by Confluence sounds like a good idea. I have made the change to the macro. It still works great.

Thank you very much for your help

comments: author: Davin Studer
body: Glad it worked for you! Wrapping the built-in macros with user macros and dynamically changing out the parameters can be super handy. Feel free to mark the question as answered.


author: Davin Studer
body: Typically, the answer that has the solution would be the one to mark as the answer. That way others who view the question can quickly find the correct answer.


author: Mike Maxson
body: Hello Davin,

Are you obtaining the user id via the user key? Is this better than using $action.getAuthenticatedUser().name? What is the risk of using the name?

Thank you again for your help

comments: author: Davin Studer
body: It works for now if you use the username inside the \<ac:parameter ac:name="assignees"\> element without the \<ri:user ri:userkey=""/\> element. However, when you create the macro in the editor itself and look at the storage format that is created by Confluence it doesn't create it with username. It uses the key. So, in order to mimic what Confluence is doing I would recommend using the key as in the future they may change how it behaves. An example of the storage format that is create normally is below.\<ac:structured-macro ac:name="tasks-report-macro"\> \<ac:parameter ac:name="assignees"\> \<ri:user ri:userkey="jdoe"/\> \<ri:user ri:userkey="jschmoe"/\> \<ri:user ri:userkey="mmouse"/\> \<ri:user ri:userkey="dduck"/\> \</ac:parameter\>\</ac:structured-macro\>


author: Davin Studer
body: Sorry ... muddled brain. Rather it would be something like this...\<ac:structured-macro ac:name="tasks-report-macro"\> \<ac:parameter ac:name="assignees"\> \<ri:user ri:userkey="8a8880c1459790bc014597917f8f03fc"/\> \<ri:user ri:userkey="8a8880c1459790bc014597917f8003d8"/\> \</ac:parameter\>\</ac:structured-macro\>


author: Mike Maxson
body: Hello Davin,

Thank you now I understand. I created a User Macro and copied the text you provided. It did not quite work. But I saw the problem. It wanted getAuthenticatedUser().name instead of .key. I made the change and now the macro works great.

Thank you very much for your help. You provided exactly what I was looking for,

comments: author: Davin Studer
body: Actually I typo'ed the user macro. It should indeed be key to match what Confluence creates for itself. Check out my edit above.


author: Mike Maxson
body: Hello Davin,

Thank you for a quick response. That looks like it should work. But I am still having trouble.

I created a page and then edited the page using the Confluence Source Editor.

I made the page storage format look like this:

\<p\>

\<ac:structured-macro ac:name="tasks-report-macro"\>

\<ac:parameter ac:name="assignees"\>

$action.getAuthenticatedUser().key

\</ac:parameter\>

\</ac:structured-macro\>

\</p\>

Then I click Apply. But after that if I look at the page storage format it has changed to this:

\<p\>

\<ac:structured-macro ac:name="tasks-report-macro"\>

\<ac:parameter ac:name="assignees"\>

\<ri:user ri:username="$action.getAuthenticatedUser().key"/\>

\</ac:parameter\>

\</ac:structured-macro\>

\</p\>

It does not recognize the variable in the macro parameters

Unknown User ($action.getAuthenticatedUser().key)

Even if I delete the \<ri:user ri:username=" and the "/\> at the end it puts it back after I click Apply.

How can I make the editor not add the ri parameter text around the $action.getAuthenticatedUser().key?

My Confluence version is 5.6.3

Thank you very much

comments: author: Davin Studer
body: It's not the page storage format you need to edit. You need to create a user macro with the above code. Sorry if that wasn't clear. Call it something like Personal Tasks. Then instead of using the task report macro use the Personal Tasks user macro.


author: Davin Studer
body: You create user macros in Confluence Admin. You need to be a system admin to create these.


author: Andreas Linsinger
body: Hi Davin,

I have created a user macro with your code from above. But somehow I cannot see this new macro in the macro browser? Do I have to restart Confluence first?

Thanks and regards, Andy