Hey,
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)?
Thanks!
Hi,
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)
notificationsManager.removeAllNotificationsForUser(userManager.getUser("admin"))
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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.