-
Improvement
-
Resolution: Unresolved
-
Neutral
-
None
-
6.2.6
In Magnolia 6 it isn't possible to select all notifications to delete them afterwards. There is no "Select all" checkbox.
Furthermore in tasks it is possible, but not really visible to use. Perhaps a checkbox icon in the table head?
Workaround
Clear notifications for a given user
import info.magnolia.ui.framework.message.MessagesManager; import info.magnolia.ui.api.message.Message; def clearNotificationsForUser(userName) { archived= 0 messagesManager = info.magnolia.objectfactory.Components.getComponent(info.magnolia.ui.framework.message.MessagesManager); session = ctx.getJCRSession("messages") qm = session.getWorkspace().getQueryManager() query="select * from [mgnl:systemMessage] where ISDESCENDANTNODE('/superuser')"; q = qm.createQuery(query, "JCR-SQL2") results = q.execute() messages = NodeUtil.asList(NodeUtil.asIterable(results.getNodes())) for (message in messages) { ++archived String id = message.getProperty("id").getValue().getString(); messagesManager.clearMessage(userName, id); } println("archived "+archived+" notifications") session.save(); } clearNotificationsForUser('superuser');
Acceptance criteria
- relates to
-
MGNLUI-5669 Improve click target for tasks and notifications
- Closed
-
MAGNOLIA-9057 Repository hygiene
- Open