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.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.