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.
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.
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.
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 :)
Dominic LaggerCommunity Leader
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