-
Problem report
-
Resolution: Fixed
-
Trivial
-
5.0.3rc1, 5.2.0alpha1
-
Sprint 67 (Aug 2020), Sprint 68 (Sep 2020), Sprint 69 (Oct 2020), Sprint 70 (Nov 2020), Sprint 71 (Dec 2020), Sprint 72 (Jan 2021), Sprint 73 (Feb 2021), Sprint 74 (Mar 2021), Sprint 75 (Apr 2021), Sprint 76 (May 2021), Sprint 77 (Jun 2021), Sprint 78 (Jul 2021), Sprint 79 (Aug 2021)
-
1.5
In many cases data set ordering is random because there is no ordering set in SQL requests. This mostly causes problems on PostgreSQL DB as sort order is not consistent there if ordering clause is not used in SQL queries.
Steps to reproduce for Graph prototype widget:
- Create graph prototype (on hostA) with two items (one item prototype from hostA and one item from hostB).
- Create dashboard with graph prototype widget and select previously created graph prototype as data source for a widget (also make sure that widget is set to dynamic mode).
- Observe that sometimes widget name was hostB prefix due to the lack of sorting in graph API.
It seems that error is caused by the lack of the ordering (ORDER BY sortorder) in the graphs_items selection SQL (CGraphGeneral::addRelatedObjects). Later ids are used to perform host.get API request where hosts are ordered by hostid field. In the end first host is used to create widget prefix. This causes invalid behavior where random host name is used as prefix.
Steps to reproduce Tags sorting in widget Problem by severity:
- Create widget Problems by severity
- Add tags as:
['name' => 'Service', 'operator' => 'Contains', 'value' => 'abc'],
['name' => 'Alpha', 'operator' => 'Contains', 'value' => ''],
['name' => 'Delta', 'operator' => 'Equals', 'value' => 'd'] - Save widget and dashboard
- Check tags order
- Save widget and dashboard again and check tags order
- Observe that tags order is different each time.
The same can happen in places:
Discovery rule -> Overrides -> Operations ordering (the order in which the operations were added should be left here)
Discovery rule -> Overrides -> Operations Trigger prototype -> Tags
Tags sorting in widget Graph in Problems tab
Interfaces sorting in item form is different from sorting on host.