Uploaded image for project: 'Magnolia UI'
  1. Magnolia UI
  2. MGNLUI-6252

Select all check box (for notifications) is missing

XMLWordPrintable

    • Icon: Improvement Improvement
    • Resolution: Unresolved
    • Icon: Neutral Neutral
    • None
    • 6.2.6
    • pulse

      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

              Unassigned Unassigned
              frank.sommer Frank Sommer
              AuthorX
              Votes:
              5 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:

                  Task DoD