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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Thursday in Confluence

Three common content challenges + how to manage them

An efficient enterprise content management system, or ECM, is a must-have for companies that create work online (cough   cough, all companies). If content calendars, marketing plans, and bu...

95 views 0 6
Read article

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