confluence dashboard task report

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?

6 answers

1 accepted

This widget could not be displayed.

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>

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>
This widget could not be displayed.

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

Davin Studer Community Champion Nov 21, 2014

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.

Davin Studer Community Champion Nov 21, 2014

You create user macros in Confluence Admin. You need to be a system admin to create these.

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

This widget could not be displayed.

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,

 

Davin Studer Community Champion Nov 24, 2014

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

This widget could not be displayed.

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

Davin Studer Community Champion Nov 24, 2014

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>

Davin Studer Community Champion Nov 24, 2014

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>

This widget could not be displayed.

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

Davin Studer Community Champion Nov 25, 2014

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.

Davin Studer Community Champion Nov 25, 2014

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.

This widget could not be displayed.

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. If you have any feedback concerning it, we would love to hear about it.

 

Kind regards,

 

Andrej Freeze

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted yesterday 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...

207 views 2 4
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