I'm writing a script that creates a series of Confluence pages that details the membership of the groups on our in-house LDAP system. The design of the layout is such that members of a group are displayed on the page using the "@" or "ri:user" macro, e.g.:
The drawback to this is that Confluence is notifying staff when the pages get created because that is the purpose of the "ri:user" macro.
Is there a way of *preventing* that notification from happening?
Alternatively, is there a different Confluence gadget or macro I can use that supports functionality like easy linking to the user's profile (which is why we picked the current method) without generating the notification?
You could create your own user macro in any way it pleases you, also it isn't a really straightforward experience to create one.
IF you look at https://confluence.atlassian.com/doc/writing-user-macros-4485.html you see at the bottoms of the page some examples. "Formatted panel" could be interesting.
You can velocity variabels in macros to get some information (like i.e. current User). Here are the variabels available in a macro: https://developer.atlassian.com/server/confluence/confluence-objects-accessible-from-velocity/.
You could use the $userAccessor variable to access the class UserAccessor and its methods. For example this would make it possible for you to use $userAccessor.getUserByName(String name) and deliver the name as an inputfield of the macro .
But like I said this is not the most straightforward way to do this. If the user profile macro is enough for you I would consult you to stay away of macro programming ;)
Your right. I overlooked the cloud part, but it shows in tags at the question.
If your interested in creating your own cloud macro: here is the link for it: https://developer.atlassian.com/cloud/confluence/connect-macros/
Unfortunately this means you have to basically write your own (simple) confluence app which may be overkill.
I think you are on the right path with the "user profile" macro. There is no way to disable the notification part of an @mention-macro.
As you already said, you can use the "User Profile" macro.
Are the pages all created in one go? If yes, you could disable the mail configuration, create the pages with the script and then enable the mail configuration again. But I'm not sure whether this is possible for cloud.
I do not know any other possibility
The script is intended to run nightly, to update the page content with any changes to our groups.
I might have a look at building a dynamic macro as the "User Profile" macro only displays email addresses for our own users and not external users, making the look of each page a bit inconsistent.
Calling all Confluence Cloud Admins! We created a new Community Group to support your unique needs as Confluence admins. This is a group where you can ask questions, access resou...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events