You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.
Join groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi all
In this little article, I want to show you, how I made a Confluence Banner with ScriptRunner with some additional features.
My goal was a confluence banner, which:
Yes, I know there are plugins for this, but with 2000 licences, theese are very expensiv and I'm a curious developer. So I did this to find out, can I do this with scriptrunner.
What I did was a confluence page, a script fragment, a REST Endpoint and a user macro. The confluence page is for the tracking which user has closed the banner.
Before I deep dive, I want to tell you, that this is a dirty way to fulfill my goal, but so far it works quite well.
Script fragment (also see github documentation)
This is the most important thing. I made a script fragment with a condition. In the condition, I made some settings for time, group and whether this user has already read the news banner.
The provider script has the banner and javascript for calling the REST Endpoint.
REST Endpoint (also see github documentation)
The REST Endpoint saves the user which clicked the close button on the created confluence page in the TextProperty
User Macro (also see github documentation)
The user macro reads all the users which are on this page in the TextProperty.
Result
When a user closes the banner, the user macro (in the confluence page) will generate the following table containing the user-data.
So I can track who clicked away the banner and when.
My versions
All of the Scripts are in my new github project: https://github.com/laschi23/confluence-banner
I am very grateful for all and any feedback :)
Regards, Dominic
Dominic Lagger
Community LeaderScrum Master / Confluence Administrator
Switzerland
125 accepted answers
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 eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
6 comments