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
Team,
Any update on this?
If we can create macro where we can select multiple space at a time ?
Thanks
Amit Anand
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:
- [Atlassian Community] How to link to Space home in User Macro?
- [Atlassian Community] Retrieving list of users in group macro
- [Atlassian Community] Get Space Name from Space Key
- [Confluence Server Developer] Confluence objects accessible from Velocity
- [Confluence Server Developer] Velocity template overview
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!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
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
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.