Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Anyone know how to filter the Task Report macro by "current user"?

Paul LaBarbera
Contributor
October 6, 2014

Hi there,


I'm building a dashboard in Confluence server v5.6.3.

 

On this dashboard, I want to include the Task Report macro.. but filter it by current user.  I can't figure out how to set the filter to "current user"

 

Here's the macro code. I just need something to add in the ri:user parameter.  Any advice would be great.

<ac:structured-macro ac:name="tasks-report-macro">
	<ac:parameter ac:name="assignees">
		<ri:user ri:userkey="ff808081469286e8014692b694df0054"/>
	</ac:parameter>
</ac:structured-macro>

 

 

5 answers

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

6 votes
Answer accepted
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2014

You could create a user macro that wraps the task-report-macro and autofills that parameter.

Paul LaBarbera
Contributor
October 6, 2014

Thanks... how can I get the current user's ID though? I'm a total newb at this stuff.. I think that I need to write something that sets the user parameter to match a variable set by the user macro... which I can handle. I just don't konw how to grab the current user's ID.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2014

Username: $action.remoteUser.name ID: $action.remoteUser.key So something like this should work... <ac:structured-macro ac:name="tasks-report-macro"> <ac:parameter ac:name="assignees"> <ri:user ri:userkey="$action.remoteUser.key"/> </ac:parameter> </ac:structured-macro>

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 6, 2014

You also need to tell it that you don't need to fill out parameters for the user macro. So, the full template would look like this...

## @noparams
<ac:structured-macro ac:name="tasks-report-macro">
	<ac:parameter ac:name="assignees">
		<ri:user ri:userkey="$action.remoteUser.key"/>
	</ac:parameter>
</ac:structured-macro>
Like wesley_geddes likes this
Paul LaBarbera
Contributor
October 6, 2014

Thanks David, I'll give that a shot

Paul LaBarbera
Contributor
October 7, 2014

This worked! Many thanks

2 votes
Daniel Rüffer
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
August 22, 2018

You could use the Table Filter Macro:

 

  1. Place a Task Report Macro within a Table Filter
  2. Choose Assignee as Dropdown filter
  3. In default values place @currentUser
  4. If you like hide the filtration pane
2 votes
JanR
Contributor
April 2, 2015

You might want to restrict the number of tasks displayed and show some pageing option. For use on a dashboard only some colums are useful, so I pimped the macro with some params:

## Macro title: mytasks
## Macro has a body: N

## @noparams
&lt;ac:structured-macro ac:name="tasks-report-macro"&gt;
    &lt;ac:parameter ac:name="assignees"&gt;
        &lt;ri:user ri:userkey="$action.remoteUser.key"/&gt;
    &lt;/ac:parameter&gt;
    &lt;ac:parameter ac:name="pageSize"&gt;10&lt;/ac:parameter&gt;
    &lt;ac:parameter ac:name="columns"&gt;description,location&lt;/ac:parameter&gt;
&lt;/ac:structured-macro&gt;

One could make these params configurable, I kept it easy for our users. It's up to you...

1 vote
Pablo Sarrias
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
January 17, 2016

This does not work with Cloud version.

Having a report of the tasks assigned to the current user is basic functionality.

Without it and without synch between tasks in confluence and external systems the whole tasks functionality is almost useless.

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
January 18, 2016

You can see your own tasks on your profile page. The url would be ...

http://{yourserver}/plugins/inlinetasks/mytasks.action

0 votes
Paul Stallworth
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
June 7, 2016

This also seems to be an appropriate workaround from David Studer & Greg MacLellan on CONF-34597

## @noparams
&lt;ac:structured-macro ac:name="tasks-report-macro"&gt;
    &lt;ac:parameter ac:name="assignees"&gt;
        &lt;ri:user ri:userkey="$action.getAuthenticatedUser().key"/&gt;
    &lt;/ac:parameter&gt;
    &lt;ac:parameter ac:name="columns"&gt;description,duedate,location&lt;/ac:parameter&gt;
&lt;/ac:structured-macro&gt;

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

TAGS
AUG Leaders

Atlassian Community Events