Skip to content

Commit

Permalink
17621 FIX HW/SW inventory: Fix version filtering in "Host has softwar…
Browse files Browse the repository at this point in the history
…e package" view

The "Min. Version" and "Max. Version" fields now filter as expected.

SUP-20752

Change-Id: I6149761de76c8e62796682212da1fa672ce913a9
  • Loading branch information
rseltmann committed Feb 13, 2025
1 parent 14345f5 commit 722f344
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 0 deletions.
14 changes: 14 additions & 0 deletions .werks/17621.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[//]: # (werk v2)
# HW/SW inventory: Fix filtering with software package version

key | value
---------- | ---
date | 2025-02-12T15:41:52+00:00
version | 2.5.0b1
class | fix
edition | cre
component | inv
level | 1
compatible | yes

The "Min. Version" and "Max. Version" fields in the "Host has software package" view now filter as expected.
1 change: 1 addition & 0 deletions cmk/gui/inventory/filters.py
Original file line number Diff line number Diff line change
Expand Up @@ -432,6 +432,7 @@ def find_package(self, packages, name, from_version, to_version):
continue
if to_version and self.version_is_higher(version, to_version):
continue
return True
return False

def version_is_lower(self, a: str | None, b: str | None) -> bool:
Expand Down

0 comments on commit 722f344

Please sign in to comment.