Restrict macro to specific space

Amit Anand September 21, 2020

I have created a macro name as "My Task" in Confluence.

<ac:structured-macro ac:name="tasks-report-macro">
<ac:parameter ac:name="assignees">
<ri:user ri:userkey="$action.remoteUser.key"/>
</ac:parameter ac:name="pageSize">;10</ac:parameter>;
</ac:parameter>
</ac:structured-macro>

 

Now i need to add parameter so that i can filter current tasks restricted to a specific space ?

Let me know if anyone done this?

 

Thanks

Amit 

2 answers

0 votes
Amit Anand October 12, 2020

Team,

Any update on this?

If we can create macro where we can select multiple space at a time ?

Thanks

Amit Anand

0 votes
Diego
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 22, 2020

Hello @Amit Anand !

As I understand, you need to limit your search within the user macro to a specific space based on space key.

You will need to get the value from $spaceManager.getSpace($spaceKey).getName() and then check all space occurrences for the selected Space Key. You can check more information on how to work with velocity loops and classes in these threads and also our documentation. Here, take a look:

You can also try to reach out to our sister community, the Developer Community! There you will be able to find skilled help for development questions. Here it is:

Let us hear from you!

Amit Anand September 23, 2020

Dear @Diego ,

Thanks for your reply !

I have achieved this with below macro(can able to select single space) but need to select multiple space at a time so is there a way out to have multiple space selection?

Below macro for your reference

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

 

Thanks

Amit

Like Diego likes this
Amit Anand September 24, 2020

Dear @Diego ,

Let me know if there is a way to create macro where we can select multiple space at a time ?

Looking for reply .

Thanks

Amit Anand

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
PRODUCT PLAN
FREE
PERMISSIONS LEVEL
Site Admin
TAGS
AUG Leaders

Atlassian Community Events