My role has changed. Hundreds of pages I was watching are now no longer relevant for me. I want to be able to do mass unwatch, rather than one by one. Or simply wipe the slate clean and unwatch all.
An alternative would be to unwatch all pages in a particular space, thus I could go through the spaces more quickly than through all the separate pages.
Any suggestions? Do I need to raise a suggestion?
Confluence 5.8
this code help me
importcom.atlassian.confluence.mail.notification.NotificationManagerimportcom.atlassian.spring.container.ContainerManagerimportcom.atlassian.sal.api.component.ComponentLocatorimportcom.atlassian.confluence.pages.PageManagerimportcom.atlassian.confluence.search.service.ContentTypeEnumimportorg.slf4j.Loggerimportorg.slf4j.LoggerFactoryimportcom.atlassian.confluence.user.UserAccessorimportcom.atlassian.confluence.spaces.SpaceManagerimportcom.atlassian.user.UserManagerLogger log = LoggerFactory.getLogger("console")
def userManager = ComponentLocator.getComponent(UserManager)
NotificationManager nm = ( NotificationManager) ContainerManager.getComponent("notificationManager")PageManager pageManager = ComponentLocator.getComponent(PageManager)ContentTypeEnum ctp = ComponentLocator.getComponent(ContentTypeEnum)UserAccessor userAccessor = ComponentLocator.getComponent(UserAccessor)def spaceManager = ComponentLocator.getComponent(SpaceManager)def users = userManager.users.find{it.getName() =="username"}def nfu = nm.getNotificationsByUser(userAccessor.getUserByName(users?.getName()))nm.removeAllNotificationsForUser(userAccessor.getUserByName(users.getName()))returnnm.getNotificationsByUser(userAccessor.getUserByName(users.getName()))
Hi Richard,
Check out this question and answers.
https://answers.atlassian.com/questions/33993
Regards,
Dave
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.