Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Custom Macro for task report with current user and parameter space

David Choi July 30, 2015

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

0 votes
Morris Chau July 20, 2016

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>

0 votes
Alex Yasurek
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
July 30, 2015

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>

David Choi July 30, 2015

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

Alex Yasurek
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 3, 2015

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.

David Choi August 17, 2015

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

Suggest an answer

Log in or Sign up to answer
TAGS
atlassian, confluence, marketing templates, confluence templates, marketing project management, content strategy, campaign planning, marketing collaboration, confluence for marketers, atlassian learning, marketing workflows, confluence best practices

5 must-use templates for Marketing teams (from a Confluence Marketer!) 👩🏻‍🎨

Who doesn’t love a good template? We sure do! Check out our top template picks for Marketing teams who want to streamline their processes, enhance collaboration, and take their marketing to new heights.

Read more 📚
AUG Leaders

Atlassian Community Events