diff --git a/Jenkinsfile b/Jenkinsfile index 65f96e6bde7..11d490f8205 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,14 +10,11 @@ def devBranch = "develop" env.REF_BRANCH = stableBranch env.PROJECT='centreon-web' - - - if (env.BRANCH_NAME.startsWith('release-22.10.0-next')) { env.BUILD = 'QA' env.REPO = 'unstable' env.DELIVERY_STAGE = 'Delivery to unstable' -} else if (env.BRANCH_NAME.startsWith('release-')) { +} else if (env.BRANCH_NAME.startsWith('hotfix-') || env.BRANCH_NAME.startsWith('release-')) { env.BUILD = 'RELEASE' env.REPO = 'testing' env.DELIVERY_STAGE = 'Delivery to testing' diff --git a/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php b/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php index 841df9abca8..ca9e4858b8f 100644 --- a/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php +++ b/src/Core/Resources/Infrastructure/Repository/DbReadResourceRepository.php @@ -127,7 +127,7 @@ private function generateFindResourcesRequest( ): string { $this->sqlRequestTranslator->setConcordanceArray($this->resourceConcordances); - $request = "SELECT SQL_CALC_FOUND_ROWS DISTINCT + $request = 'SELECT SQL_CALC_FOUND_ROWS DISTINCT resources.resource_id, resources.name, resources.alias, @@ -171,7 +171,8 @@ private function generateFindResourcesRequest( FROM `:dbstg`.`resources` LEFT JOIN `:dbstg`.`resources` parent_resource ON parent_resource.id = resources.parent_id - LEFT JOIN `:dbstg`.`severities` + AND parent_resource.type = ' . self::RESOURCE_TYPE_HOST . + " LEFT JOIN `:dbstg`.`severities` ON `severities`.severity_id = `resources`.severity_id LEFT JOIN `:dbstg`.`resources_tags` AS rtags ON `rtags`.resource_id = `resources`.resource_id diff --git a/tests/php/Core/Resources/Infrastructure/Repository/DbReadResourceRepositoryTest.php b/tests/php/Core/Resources/Infrastructure/Repository/DbReadResourceRepositoryTest.php index 2c32f9d363d..d73e9aeaa6d 100644 --- a/tests/php/Core/Resources/Infrastructure/Repository/DbReadResourceRepositoryTest.php +++ b/tests/php/Core/Resources/Infrastructure/Repository/DbReadResourceRepositoryTest.php @@ -110,12 +110,13 @@ function generateExpectedSQLQuery(string $accessGroupRequest): string FROM `centreon-monitoring`.`resources` LEFT JOIN `centreon-monitoring`.`resources` parent_resource ON parent_resource.id = resources.parent_id - LEFT JOIN `centreon-monitoring`.`severities` + AND parent_resource.type = 1' . + " LEFT JOIN `centreon-monitoring`.`severities` ON `severities`.severity_id = `resources`.severity_id LEFT JOIN `centreon-monitoring`.`resources_tags` AS rtags ON `rtags`.resource_id = `resources`.resource_id INNER JOIN `centreon-monitoring`.`instances` - ON `instances`.instance_id = `resources`.poller_id WHERE ' . + ON `instances`.instance_id = `resources`.poller_id WHERE " . " resources.name NOT LIKE '\_Module\_%' AND resources.parent_name NOT LIKE '\_Module\_BAM%' AND resources.enabled = 1 AND resources.type != 3 " . diff --git a/www/install/insertBaseConf.sql b/www/install/insertBaseConf.sql index da325d433c8..15663e5b06e 100644 --- a/www/install/insertBaseConf.sql +++ b/www/install/insertBaseConf.sql @@ -2,7 +2,7 @@ -- Insert version -- -INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.10.0'); +INSERT INTO `informations` (`key` ,`value`) VALUES ('version', '22.10.1'); -- -- Contenu de la table `contact` diff --git a/www/install/php/Update-22.10.1.php b/www/install/php/Update-22.10.1.php new file mode 100644 index 00000000000..8572f2a05df --- /dev/null +++ b/www/install/php/Update-22.10.1.php @@ -0,0 +1,20 @@ +