Details
-
Problem report
-
Resolution: Unresolved
-
Major
-
None
-
5.4.2, 5.4.3
-
rhel 8
php 7.2
postgresql-12
apache 2.4.37
-
Sprint 80 (Sep 2021), Sprint 81 (Oct 2021), Sprint 82 (Nov 2021), Sprint 83 (Dec 2021), Sprint 84 (Jan 2022), Sprint 85 (Feb 2022), Sprint 86 (Mar 2022), Sprint 87 (Apr 2022)
Description
Steps to reproduce:
- rhel 8
php 7.2
postgresql-12
apache 2.4.37
Clean install.
Tag filters don't work when trying to make a custom panel in the trigger overview
used sql queries for different tags, and somehow it works strangely: This is a request with Recent problems:
SELECT p.eventid,p.acknowledged,p.objectid,p.severity,p.r_eventid FROM problem p WHERE p.source='0' AND p.object='0' AND p.objectid IN (19249,19263,20170) AND EXISTS (SELECT NULL FROM problem_tag WHERE p.eventid=problem_tag.eventid AND problem_tag.tag='Application' AND UPPER(problem_tag.value) LIKE '%PRINTER%' ESCAPE '!') AND (p.r_eventid IS NULL OR p.r_clock>1627403603);
This is a request with the Problems field I have:
SELECT p.eventid,p.acknowledged,p.objectid,p.severity,p.r_eventid FROM problem p WHERE p.source='0' AND p.object='0' AND p.objectid IN (19249,19263,20170) AND EXISTS (SELECT NULL FROM problem_tag WHERE p.eventid=problem_tag.eventid AND problem_tag.tag='Application' AND UPPER(problem_tag.value) LIKE '%PRINTER%' ESCAPE '!') AND p.r_eventid IS NULL;
And here it is with Any:
SELECT p.eventid,p.acknowledged,p.objectid,p.severity,p.r_eventid FROM problem p WHERE p.source='0' AND p.object='0' AND p.objectid IN (13075,13436,13467,13468,13470,13471,13472,13473,13474,13475,13476,13477,13479,13480,13481,13482,13483,13484,13485,13486,13487,13488,13489,13490,13537,13558,13560,13563,13567,13570,13571,15854,15856,16046,16054,16056,16060,16062,16064,16066,16068,16199,16274,16565,16581,17537,17538,18136,18138,18454,18532,18533,18963,18964,18965,18966,18967,18968,18969,18970,18971,18972,18973,18974,19046,19047,19048,19049,19050,19051,19052,19054,19055,19056,19057,19058,19059,19090,19091,19092,19093,19094,19095,19096,19098,19099,19100,19101,19102,19103,19112,19113,19114,19115,19116,19117,19118,19119,19120,19121,19122,19123,19124,19125,19126,19127,19128,19129,19133,19134,19135,19136,19137,19138,19139,19140,19141,19168,19169,19170,19171,19200,19201,19202,19203,19204,19205,19206,19207,19208,19209,19210,19211,19212,19213,19214,19215,19216,19217,19218,19219,19220,19221,19222,19223,19224,19225,19226,19230,19231,19232,19233,19234,19237,19238,19239,19240,19241,19242,19243,19244,19245,19246,19247,19248,19249,19250,19252,19253,19254,19255,19256,19257,19259,19260,19261,19262,19263,19264,19266,19267,19268,19269,19270,19271,19273,19274,19275,19276,19277,19278,19280,19281,19282,19283,19284,19285,19286,19287,19288,19289,19290,19291,19292,19293,19294,19295,19296,19297,19298,19299,19300,19301,19302,19303,19304,19305,19306,19307,19309,19310,19311,19312,19313,19314,19315,19316,19317,19318,19319,19320,19321,19322,19323) AND NOT EXISTS (SELECT NULL FROM event_suppress es WHERE es.eventid=p.eventid) AND EXISTS (SELECT NULL FROM problem_tag WHERE p.eventid=problem_tag.eventid AND problem_tag.tag='Application' AND UPPER(problem_tag.value) LIKE '%PRINTER%' ESCAPE '!') AND p.r_eventid IS NULL;
As a result: the last request does not contain the required objectid and therefore dumps everything that is
If you add the required objectid, then it issues the required event by the required filter
The problem is that triggers are not filtered by the tag specified in the filters