How to show the task of a login user in a dashboard / solved
Asked by Henricus Fluthgraf:

I have a dashboard space

the login user don't have a personal space.

how can I show them their task?

i didn't find a original tool in the atlassian area.

i only heared, I need to write a macro.

i am not a software programmer, so who can help me?

best Henry


Answers:
author: Davin Studer
body: Since you are on Confluence Server you can use a user macro to wrap the task report macro to supply the current user. The way you can do this would be to create a task report macro with all the parameters set up the way you want. Make sure to set yourself as the user (we will override this in a bit). You will need the [Confluence Source Editor](https://marketplace.atlassian.com/apps/1210722/confluence-source-editor?hosting=server&tab=overview) for this next part. It's an add-on made by Atlassian. This will give you the option to look at the storage format for your page which is a a semi-html looking format. Look for the xml for your macro setup. It should look something like this ...

```
<ac:structured-macro ac:macro-id="{some numbers and letters}" ac:name="tasks-report-macro" ac:schema-version="1">
    <ac:parameter ac:name="assignees">
        <ri:user ri:userkey="{some numbers and letters}"/>
    </ac:parameter>
</ac:structured-macro>
```

I accepted the defaults for most of the parameters so my example above only shows the assigness parameter. Yours may show more if you change some of the parameters from the default. But this will get us the storage format we will need to create a user macro. From here we can create a user macro where we will use all the settings you set but override the assignees section.

So, go create a new user macro with these settings ...

**Macro Name:**   
current_user_task_report

**Macro Title:**   
Current User Task Report

**Description:**   
Create a report of tasks for the current user from specific locations, people, status and more.

**Macro Body Processing:**   
No macro body

**Template:**

```
## @noparams<ac:structured-macro ac:name="tasks-report-macro" ac:schema-version="1"> <ac:parameter ac:name="assignees">  <ri:user ri:userkey="$action.remoteUser.key"/> </ac:parameter></ac:structured-macro>
```

So the **Template** above will basically just be what you grabbed from the source editor but you will change the ...

```
<ri:user ri:userkey="{some numbers and letter}"/>
```

to

```
<ri:user ri:userkey="$action.remoteUser.key"/>
```

Then save your user macro and use it wherever you want a task report that shows only the current user's tasks.

comments: author: AnnWorley
body: Thank you for this superlative post [@Davin Studer](/t5/user/viewprofilepage/user-id/781467)!


author: Henricus Fluthgraf
body: Hello [@Davin Studer](/t5/user/viewprofilepage/user-id/781467),

thx. This it is. It works. 1000 thx for your detailed Explanation.

Best Henry


author: Davin Studer
body: No problem. Please make sure to mark the question as answered. Thanks.


author: Henricus Fluthgraf
body: I did it in the headlin, or is there any other possibility ?


author: Davin Studer
body: There is a checkmark next to answers. Checking that mark it as the answer to the question.

![Capture.PNG](https://community.atlassian.com/t5/image/serverpage/image-id/21887iE04FC84167B430A2/image-size/large?v=v2&px=999 "Capture.PNG")


author: Henricus Fluthgraf
body: thx, so i marked it as solved ;-) again 1000 thx


author: Marek Wowkostryl
body: Hello Davin!

Your solution is great, although I've encountered that your macro shows only tasks where there is only one assignee or user is first of all assignees in the task.

So, in other words, when in the task there are few assignees, the task is shown in the list only, when logged user is first of assignees.

I hope I made it clear. :)

Can you help with such issue?


author: Stian Espe
body: Hi! Trying to get your brilliant tip to work, however i only get the following output when following your guide, any idea?   
- I do have task assigned to myself  
- After changing the source to the below, the task report is empty.

```
<ri:user ri:userkey="$action.remoteUser.key"/>
```

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


author: Davin Studer
body: You can't do it by changing the source. You need to create a user macro. The source editor is simple to set the macro up the way you want initially and then to get the storage format for that setup. The user macro will then do the work of dynamically swapping out the user piece for you. By changing the source you are telling the macro to literally show tasks for the user "$action.remoteUser.key" ... which of course that user doesn't really exist.


author: Stian Espe
body: Sorry about that, should have read more carefully thru your description..   
Tested \& Works.. =) Thanks!


author: Joyner Stance
body: Hello,   

I managed to create the user macro, even though it requires you to set some parameters otherwise it won't be displayed in the macro list.

Still, I would like to extend this to be able to also select tasks:

* with no due date
* with no assignee

Anybody has an idea how?

I'm reading up on Velocity as we speak, but I hope I can also find some quick help around here.


author: Sam Yil
body: Hi [@Davin Studer](/t5/user/viewprofilepage/user-id/781467)

is there a workaround or another approach for DataCenter? We use Confluence DataCenter (7.19.9) and this unfortunately does not work for us. I don't get any result(enough tasks are available, different \& same space, page..). Configured as you specified..

![2023-07-31 17_18_24-Window.jpg](https://community.atlassian.com/t5/image/serverpage/image-id/272210i58359452C008F018/image-size/large?v=v2&px=999 "2023-07-31 17_18_24-Window.jpg")

Thanks in advance!

Sam


author: AnnWorley
body: Hi Henricus,

We do have the [task report macro](https://confluence.atlassian.com/doc/task-report-macro-590260009.html) in Confluence. Use the Task Report macro to display a list of tasks on a page. Filter the tasks by space, page, user, label, created date and more.

Please let me know if that works for your case.

Thanks,

Ann

comments: author: Fluthgraf
body: [@AnnWorley](/t5/user/viewprofilepage/user-id/502040)

yes, i know, but set a filter for a user (static) but the filter should be dynamic. Only Show the Task for the logged in user.

@mr.x : is spec

it should be something like

@loggedinuser (how to set)

what can i write into the field user to make the setting depending on the logged in user.

Best Henry


Tags: confluence-server

server

task-report-macro