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

This widget could not be displayed.

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.

This widget could not be displayed.

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 Monday 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...

526 views 7 6
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