Actions
Bug #8775
closedApplicable errata is not a subset of available errata
Description
The second query looks right to me at first glance, and can't see at all how it's generating a higher number... available should be a subset of applicable always. This is causing some oddness in mails with negative numbers and such.
Applicable errata:
irb(main):018:0> system.applicable_errata.count (0.9ms) SELECT COUNT(*) FROM "katello_errata" INNER JOIN "katello_system_errata" ON "katello_errata"."id" = "katello_system_errata"."erratum_id" WHERE "katello_system_errata"."system_id" = 17 => 26
Available errata:
irb(main):019:0> system.available_errata.count Katello::Repository Load (0.8ms) SELECT "katello_repositories".* FROM "katello_repositories" INNER JOIN "katello_system_repositories" ON "katello_repositories"."id" = "katello_system_repositories"."repository_id" WHERE "katello_system_repositories"."system_id" = 17 ORDER BY katello_repositories.name ASC (1.0ms) SELECT COUNT(*) FROM "katello_errata" INNER JOIN "katello_repository_errata" ON "katello_repository_errata"."erratum_id" = "katello_errata"."id" INNER JOIN "katello_system_errata" ON "katello_errata"."id" = "katello_system_errata"."erratum_id" WHERE "katello_system_errata"."system_id" = 17 AND "katello_repository_errata"."repository_id" IN (72, 44, 8, 7, 45) => 42
Updated by Stephen Benjamin almost 10 years ago
Ah, there's duplicate errata:
system.available_errata.map(&:errata_id).count = 42
system.available_errata.map(&:errata_id).sort.uniq.count = 26
Updated by The Foreman Bot almost 10 years ago
- Status changed from New to Ready For Testing
- Target version set to 62
- Pull request https://github.com/Katello/katello/pull/4891 added
- Pull request deleted (
)
Updated by Justin Sherrill almost 10 years ago
- Translation missing: en.field_release set to 14
Updated by Anonymous almost 10 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset katello|3d1a7d18405371d5a343a22c9058d3d1a45e5b58.
Actions