Select -1 as `state' for history queries not providing a valid state
PostgreSQL does not seem to be able to union null values with integers... refs #9009
This commit is contained in:
parent
77fe094870
commit
f2425a97d5
|
@ -26,7 +26,7 @@ class HostcommenthistoryQuery extends IdoQuery
|
|||
'type' => "(CASE hch.entry_type WHEN 1 THEN 'comment' WHEN 2 THEN 'dt_comment' WHEN 3 THEN 'flapping' WHEN 4 THEN 'ack' END)",
|
||||
'timestamp' => 'UNIX_TIMESTAMP(hch.comment_time)',
|
||||
'object_id' => 'hch.object_id',
|
||||
'state' => '(NULL)',
|
||||
'state' => '(-1)',
|
||||
'output' => "('[' || hch.author_name || '] ' || hch.comment_data)",
|
||||
),
|
||||
'hostgroups' => array(
|
||||
|
|
|
@ -26,7 +26,7 @@ class HostdowntimestarthistoryQuery extends IdoQuery
|
|||
'type' => "('dt_start')",
|
||||
'timestamp' => 'UNIX_TIMESTAMP(hdh.actual_start_time)',
|
||||
'object_id' => 'hdh.object_id',
|
||||
'state' => '(NULL)',
|
||||
'state' => '(-1)',
|
||||
'output' => "('[' || hdh.author_name || '] ' || hdh.comment_data)",
|
||||
),
|
||||
'hostgroups' => array(
|
||||
|
|
|
@ -30,7 +30,7 @@ class ServicecommenthistoryQuery extends IdoQuery
|
|||
'type' => "(CASE sch.entry_type WHEN 1 THEN 'comment' WHEN 2 THEN 'dt_comment' WHEN 3 THEN 'flapping' WHEN 4 THEN 'ack' END)",
|
||||
'timestamp' => 'UNIX_TIMESTAMP(sch.comment_time)',
|
||||
'object_id' => 'sch.object_id',
|
||||
'state' => '(NULL)',
|
||||
'state' => '(-1)',
|
||||
'output' => "('[' || sch.author_name || '] ' || sch.comment_data)",
|
||||
),
|
||||
'hostgroups' => array(
|
||||
|
|
|
@ -30,7 +30,7 @@ class ServicedowntimestarthistoryQuery extends IdoQuery
|
|||
'type' => "('dt_start')",
|
||||
'timestamp' => 'UNIX_TIMESTAMP(sdh.actual_start_time)',
|
||||
'object_id' => 'sdh.object_id',
|
||||
'state' => '(NULL)',
|
||||
'state' => '(-1)',
|
||||
'output' => "('[' || sdh.author_name || '] ' || sdh.comment_data)",
|
||||
),
|
||||
'hostgroups' => array(
|
||||
|
|
Loading…
Reference in New Issue