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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

ScriptRunner for Confluence- bulk change


I'm using ScriptRunner for Confluence.

I want to create a script macro how can un-watch all Confluence content for a specific user?

I know how to create a macro with params but as anybody knows a commend for us-watching?

Additionally, Is it possible to remove all user drafts in Confluence (bulk with ScriptRunner for Confluence)?


1 answer

1 accepted


I will attempt to answer the first of your questions.

This should remove all content that a specific user is watching. I tried it quickly in the script console and it seems to be working.


import com.atlassian.sal.api.component.ComponentLocator
import com.atlassian.confluence.mail.notification.NotificationManager
import com.atlassian.user.UserManager

def notificationsManager = ComponentLocator.getComponent(NotificationManager)
def userManager = ComponentLocator.getComponent(UserManager)



As for the second question, I don't see any reason why it shouldn't be possible to remove all drafts for a specific user, but I have not tried it before.

Hey, Thanks!

I will try this.

Suggest an answer

Log in or Sign up to
This widget could not be displayed.
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

714 views 5 20
Read article

Community Events

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

Events near you