From c3d1a48eec47caa4b0949a765fe52f5aab42b5e8 Mon Sep 17 00:00:00 2001 From: Dominik Hassler Date: Sun, 28 Apr 2024 13:30:44 +0000 Subject: [PATCH] issue: default to illumos even if multiple bug IDs are provided --- lib/OOCEapps/Controller/Issue.pm | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/lib/OOCEapps/Controller/Issue.pm b/lib/OOCEapps/Controller/Issue.pm index 51fb89e..716481a 100644 --- a/lib/OOCEapps/Controller/Issue.pm +++ b/lib/OOCEapps/Controller/Issue.pm @@ -11,13 +11,12 @@ sub process { return if !$c->checkToken; - #default to illumos if just a number is provided - $p = "illumos $p" if $p =~ /^\d+$/; - + # default to illumos if just numbers and whitespaces are provided + $p = "illumos $p" if $p =~ /^[\d\s]+$/; my $_p = $c->model->issue->process_p(qw(ooceapps ooceapps), $p, 1); - return $c->render(json => OOCEapps::Mattermost->text("no issue found using search string '$p'")) + return $c->render(json => OOCEapps::Mattermost->text("no issues found using search string '$p'")) if !blessed $_p; $c->render_later; @@ -36,7 +35,7 @@ __END__ =head1 COPYRIGHT -Copyright 2022 OmniOS Community Edition (OmniOSce) Association. +Copyright 2024 OmniOS Community Edition (OmniOSce) Association. =head1 LICENSE