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

Availability check on multi action blocks UI

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an issue
    • Icon: Neutral Neutral
    • None
    • 5.3.7
    • app framework
    • None

      Having none destructive (such that preserves selection) action that can be applied to multiple items will block UI for given user and send CPU on server to 100% usage.

      To reproduce:

      • select number of items in the workbench
      • execute some non destructive multiaction on them (Create one if you don't have anything ready, it doesn't have to do absolutely anything)
      • after exectution of the action, TreePresenter will collect all selected items and fire SelectionChangedEvent on them in
        TreePresenter:144
                eventBus.fireEvent(new SelectionChangedEvent(Collections.unmodifiableSet(new HashSet<Object>(selectedItemIds))));
        
      • this in turn will force evaluation of ALL actions configured in the app on EACH item ... if you have anywhere around 100 items selected, you can go for coffee before availability for all is checked ... you can use your App/DB server cpu to heat up that coffee too
      • code triggered by the action gets stuck in
        info.magnolia.ui.framework.availability.AvailabilityCheckerImpl.isAvailable(AvailabilityDefinition, List<Object>)
                while (isAvailable && ruleIterator.hasNext()) {
                    AvailabilityRule rule = ruleIterator.next();
                    boolean ruleHolds = rule.isAvailable(idsToCheck);
                    isAvailable &= ruleHolds;
                }
        

        Acceptance criteria

              Unassigned Unassigned
              had Jan Haderka
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved:

                  Bug DoR
                  Task DoD