Merge pull request #3413 from Icinga/bugfix/filter-contacts-assigned-to-services-3088
IDO: treat contacts of services of hosts as direct contacts of the hosts
This commit is contained in:
commit
33247237af
|
@ -3,16 +3,17 @@
|
|||
<?php if (! $this->compact): ?>
|
||||
<?= $this->tabs; ?>
|
||||
<?php endif ?>
|
||||
<h1><?= $this->translate('Contact details') ?></h1>
|
||||
<div class="circular" style="background-image: url('<?=
|
||||
$this->href('static/gravatar', array('email' => $contact->contact_email))
|
||||
?>')"></div>
|
||||
|
||||
<?php if (! $contact): ?>
|
||||
<?= $this->translate('No such contact') ?>: <?= $contactName ?>
|
||||
</div>
|
||||
<?php return; endif ?>
|
||||
|
||||
<h1><?= $this->translate('Contact details') ?></h1>
|
||||
<div class="circular" style="background-image: url('<?=
|
||||
$this->href('static/gravatar', array('email' => $contact->contact_email))
|
||||
?>')"></div>
|
||||
|
||||
<table class="avp" style="width: 70%">
|
||||
<tbody>
|
||||
<tr>
|
||||
|
|
|
@ -148,6 +148,7 @@ class ContactQuery extends IdoQuery
|
|||
*/
|
||||
protected function joinHosts()
|
||||
{
|
||||
$this->requireVirtualTable('services');
|
||||
$this->select->joinLeft(
|
||||
array('hc' => $this->prefix . 'host_contacts'),
|
||||
'hc.contact_object_id = c.contact_object_id',
|
||||
|
@ -158,7 +159,7 @@ class ContactQuery extends IdoQuery
|
|||
array()
|
||||
)->joinLeft(
|
||||
array('ho' => $this->prefix . 'objects'),
|
||||
'ho.object_id = h.host_object_id AND ho.is_active = 1',
|
||||
'(ho.object_id = h.host_object_id OR ho.object_id = s.host_object_id) AND ho.is_active = 1',
|
||||
array()
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue