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
Atlassian Community Anniversary

Happy Anniversary, Atlassian Community!

This community is celebrating its one-year anniversary and Atlassian co-founder Mike Cannon-Brookes has all the feels.

Read more
Community showcase
Kesha Thillainayagam
Posted Friday in Confluence

We want to hear how your non-technical teams are using Confluence!

Hi Community! Kesha (kay-sha) from the Confluence marketing team here! Can you share stories with us on how your non-technical (think Marketing, Sales, HR, legal, etc.) teams are using Confluen...

254 views 11 10
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