Uploaded image for project: 'ZABBIX BUGS AND ISSUES'
  1. ZABBIX BUGS AND ISSUES
  2. ZBX-10505

Triggers list sorting by Name is incorrect for uppercase and lowercase letters

XMLWordPrintable

      Simplest way to reproduce:

      • create a template with one dummy item;
      • create a trigger with name "a" for this item;
      • create a trigger with name "A" for this item;
      • sort triggers by Name as ^;
      • open another browser tab and edit those triggers (in two steps) to get swapped trigger names;
      • make sure that sorting is set the same way as on previous tab - as ^;
      • compare with previous tab and notice different order of displayed triggers - reproduced.

      In such case triggers actually sorted by trigger ID.

      There could other use cases to reproduce it - like host exporting and then importing with different name etc.

      A patch to fix it:

      Index: triggers.php
      ===================================================================
      --- triggers.php        (revision 58503)
      +++ triggers.php        (working copy)
      @@ -490,6 +490,7 @@
              $data['paging'] = getPagingLine($data['triggers'], $sortOrder);
      
              $data['triggers'] = API::Trigger()->get([
      +               'sortfield' => $sortField,
                      'output' => ['triggerid', 'expression', 'description', 'status', 'priority', 'error', 'templateid', 'state'],
                      'selectHosts' => ['hostid', 'host', 'name'],
                      'selectDependencies' => ['triggerid', 'description'],
      

      With the fix - trigger "a" will be always first, as it is for example for item keys in items list, or order of entities in exported XML - lowercase letters are first.

      I supposed this bug could be fixed by ZBX-9402, but it's not.

            Unassigned Unassigned
            zalex_ua Oleksii Zagorskyi
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: