It is posible to receive a notification when a page is include with the include page macro?

Miriam April 5, 2019

It is posible to receive a notification when a page is include with the include page macro?

2 answers

2 accepted

1 vote
Answer accepted
Tony Gough [Adaptavist]
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.
April 12, 2019

Hi Miriam & Shannon,

Unfortunately Notifications for ScriptRunner won't satisfy this requirement. The main intention behind Notifications is to make it easier for users to manage the content they are watching, and in turn the content they receive notifications for.

The requirement is a tricky one. It would be possible to come up with a solution for this using ScriptRunner, which provides the ability to write custom scripts which can access Confluence's Java API. It would not be a trivial script to write, though. At a high level, you would need to do the following:

1) Create an Event Listener which triggers on PageUpdateEvents.

2) The event handler code should retrieve the triggering page's body content and search for the presence of the Include macro.

3) You could then search the raw macro xhtml for the parameter value returning the included page.

4) At this point you could send email notifications or take other actions as required.

We don't have a specific custom scripting example for this use case, but you can find other examples along with further information on ScriptRunner in our documentation:

https://scriptrunner.adaptavist.com/latest/confluence/quickstart.html

Kind regards,
Tony

Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 12, 2019

Tony,

Thank you so much for the detailed explanation! It's really appreciated.

Regards,

Shannon

0 votes
Answer accepted
Shannon S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
April 8, 2019

Hello Miriam,

Welcome to Community. It's nice to meet you.

This isn't a feature built into Confluence, but you might be able to use an add-on such as Scriptrunner Notifications for this. I'm not personally familiar with that add-on, but I'm tagging the vendor in case they can confirm that with us.

I've also moved your question to Marketplace in case other users could recommend an add-on that could help to accomplish this.

Regards,

Shannon

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events