Custom Macro for task report with current user and parameter space

Hi,

I am trying to create a user custom macro, which allows me to have a task report for the current user for a specified space (should be able to be parametrized).

Unfortunately, the macro was not able to filter only the tasks from a specified space.

What I am doing wrong?

 

## Macro title: mytasks
## Macro has a body: N
## @param space:title=Space|type=spacekey
<ac:structured-macro ac:name="tasks-report-macro">
  <ac:parameter ac:name="space">spaces:masterdata</ac:parameter>
  <ac:parameter ac:name="assignees">
        <ri:user ri:userkey="$action.remoteUser.key"/>
  </ac:parameter>
  <ac:parameter ac:name="pageSize">10</ac:parameter>
</ac:structured-macro>

2 answers

Hi,

Try using this code and see if that works for you:

<ac:structured-macro ac:name="tasks-report-macro">
<ac:parameter ac:name="spaces">$paramSpace</ac:parameter>
<ac:parameter ac:name="assignees">
<ri:user ri:userkey="$action.remoteUser.key"/>
</ac:parameter>
<ac:parameter ac:name="spaceAndPage">space:$paramSpace</ac:parameter>
</ac:structured-macro>

Hi, unfortunately this macro did now work, it still do not filter.

Have you tried adding an actual user key in there instead of "$action.remoteUser.key"? Just wondering if maybe that is what is causing the issue.

No, I actually need the current user, which is currently logged in, not from a specific individual user.

Hi,

This may works.

## @param space:title=Space|type=spacekey
<ac:structured-macro ac:name="tasks-report-macro">
<ac:parameter ac:name="spaces">$paramspace</ac:parameter>
<ac:parameter ac:name="assignees">
<ri:user ri:userkey="$action.remoteUser.key"/>
</ac:parameter>
</ac:structured-macro>

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Oct 24, 2018 in Confluence

Atlassian Research opportunity with Confluence templates

Do you use templates with Confluence? Take part in a remote 1-hr workshop. You'll receive USD $100 for your time!   We're looking for people to participate in a   remote 1-hr workshop...

1,526 views 25 14
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