Project

General

Profile

Actions

Bug #8775

closed

Applicable errata is not a subset of available errata

Added by Stephen Benjamin almost 10 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
High
Assignee:
-
Category:
Errata Management
Target version:
Difficulty:
Triaged:
Yes
Fixed in Releases:
Found in Releases:

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

Actions

Also available in: Atom PDF