[ZBX-9414] Sorting by trends uses 365 day for non-numerical data type Created: 2015 Mar 19  Updated: 2018 Feb 21  Resolved: 2015 May 22

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: API (A), Frontend (F), Installation (I), Server (S)
Affects Version/s: 2.2.9
Fix Version/s: 2.5.0

Type: Incident report Priority: Trivial
Reporter: Kodai Terashima Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: item, itemprototype, sorting, trends
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File item-trends-sort.png     PNG File sorting-by-interval.png    
Issue Links:
Causes
causes ZBX-13412 Undefined javascript variable editing... Closed

 Description   

Sorting by trends uses 365 day for non-numerical data type because frontend uses 365 day as a default value for trends.

It's better to use 0 as a default value or check data type for sorting.



 Comments   
Comment by Michael Spurlock [ 2015 Apr 16 ]

(1) when using the filters in Config->Hosts->Items view if I put "365" in the Trends field I get fields with 365 in them as specified but I also get blanks in the results meaning the result set contains items with a blank Trends field

iivs RESOLVED in r53322

asaveljevs Similarly to (4), specifying "0" in "Interval" filter selects trapper items, even though their "Interval" column is blank. If I specify "0" in "Trends" filter, then items with blank "Trends" column are not selected. REOPENED.

iivs So as we discussed with sasha the behaviour for trends is now correct. Meaning that filtering by 0, blank trend records are not displayed. Same is now done for interval.
RESOLVED in r53398

asaveljevs CLOSED

Comment by Ivo Kurzemnieks [ 2015 Apr 22 ]

(2) [I] A DB Patch is required to convert trend values to zero for non-numeric item types.

iivs RESOLVED in r53332

asaveljevs CLOSED

Comment by Ivo Kurzemnieks [ 2015 Apr 23 ]

(3) [S] Please, check if LLD items with non-numeric value type are created with zero trends value.

asaveljevs Items will be created with whatever "trends" value a prototype has. Is it good enough?

iivs I think, yes. Ok,
CLOSED.

Comment by Ivo Kurzemnieks [ 2015 Apr 23 ]

Frontend and patch currently RESOLVED in svn://svn.zabbix.com/branches/dev/ZBX-9414

Comment by Aleksandrs Saveljevs [ 2015 Apr 23 ]

(4) [F] A similar problem is when sorting by interval - trapper items might get squeezed between items with 0 interval:

iivs RESOLVED in r53398

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2015 Apr 23 ]

(5) [F] Suppose we have a "Character" item and change its type to "Numeric (unsigned)". Its "Trends" field will be 0, but it used to be 365 before. The old behavior seems to be better, as it is more likely to prevent the user from making mistakes.

iivs RESOLVED in r53405, r53422

asaveljevs CLOSED

Comment by Ivo Kurzemnieks [ 2015 Apr 23 ]

(6) No translation string changes.

asaveljevs CLOSED

Comment by Ivo Kurzemnieks [ 2015 Apr 28 ]

(7) Interval display is different in discovery rule and item prototype sections and must be the same as in items section - do not display zeroes for trapper and SNMP trap items.

iivs RESOLVED in r53400

asaveljevs It should be checked whether this solves ZBX-7442.

iivs For discovery rules with type "Zabbix trapper", the "Interval" column is now blank instead of "0". For item prototypes with type "Zabbix trapper" or "SNMP trap", the "Interval" column is now also blank instead of "0". So yes, I think it does solve it as well.

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2015 Apr 29 ]

(8) Line items.php:1119 artificially adds ITEM_TYPE_HTTPTEST to the list of filtered types. However, HTTP items are not available in the filter dropdown.

iivs RESOLVED in r53548

asaveljevs Around the mentioned line, $filter_delay is validated to be being greater than or equal to 0. I wonder what is the use of it, considering that $_REQUEST['filter_delay'] is validated to be an integer between 0 and SEC_PER_DAY at the very top.

iivs RESOLVED in r53554

asaveljevs CLOSED

Comment by Aleksandrs Saveljevs [ 2015 Apr 29 ]

(9) Please review typo fixes in comments in r53428.

iivs Thanks!
CLOSED.

Comment by Ivo Kurzemnieks [ 2015 May 19 ]

(10) There were conflicts due to merge from trunk. Please review r53683

sasha looks good but take a look at my changes in r53688 and r53708.

iivs CLOSED.

Comment by Alexander Vladishev [ 2015 May 20 ]

(11) trends should be cleared for string data types in data.tmpl

sasha RESOLVED in r53690.

iivs CLOSED.

Comment by Alexander Vladishev [ 2015 May 20 ]

(12) The new string items and item prototypes are created without trends (trends = 0). It's good. Update such items resets trends to 365. It's bad.

iivs RESOLVED in r53715

sasha CLOSED

Comment by Ivo Kurzemnieks [ 2015 May 22 ]

Fixed in pre-2.5.0 (trunk) r53733

Generated at Sat Apr 27 05:37:19 EEST 2024 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.