Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Is it possible to use ri:user without notifying the person concerned?

Philip Colmer
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.
March 4, 2021

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

Screenshot 2021-03-04 112504.png

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?

 

3 answers

0 votes
Dominic Lagger
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.
March 4, 2021

HI  @Philip Colmer 

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

Regards, Dominic

Philip Colmer
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.
March 4, 2021

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.

Like Dominic Lagger likes this
0 votes
Mario Carabelli March 4, 2021

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

Philip Colmer
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.
March 4, 2021

Thanks @Mario Carabelli . Unfortunately, I don't *think* that user macros are available in Confluence Cloud.

I didn't explicitly mention it was Cloud in my question because I thought it showed up elsewhere on the web page.

Mario Carabelli March 4, 2021

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. 

0 votes
Philip Colmer
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.
March 4, 2021

There is a "user profile" macro ... I'm going to try that on the page layout and see how that goes ...

User profile seems to be the way to go for our needs. It is slightly frustrating that it only displays email addresses for "internal" users.

 

Suggest an answer

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

Atlassian Community Events