-
Incident report
-
Resolution: Won't fix
-
Major
-
None
-
2.4.7, 3.0.0, 3.2.0alpha1
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.