A......... [ZBXNEXT-1133] simplified condition sorting code