From bcfafa262ce52b80b254aaccb22194978937260e Mon Sep 17 00:00:00 2001 From: Ewoud Kohl van Wijngaarden Date: Mon, 6 Nov 2023 17:25:21 +0100 Subject: [PATCH] Support Katello naming in Redmine versions --- redmine | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/redmine b/redmine index dee4565..d49f32b 100755 --- a/redmine +++ b/redmine @@ -39,8 +39,10 @@ def create_version(args: argparse.Namespace) -> None: def set_status_version(args: argparse.Namespace) -> None: redmine = get_redmine() versions = redmine.version.filter(project_id=args.project_id) + # Katello uses 'Katello x.y.z' instead of 'x.y.z' + matches = (args.name, f'{args.project_id.capitalize()} {args.name})') try: - version = [version for version in versions if version.name == args.name][0] + version = [version for version in versions if version.name in matches][0] except IndexError: raise SystemExit('Version not found')