diff options
Diffstat (limited to 'app/models/integrations/jira.rb')
-rw-r--r-- | app/models/integrations/jira.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/integrations/jira.rb b/app/models/integrations/jira.rb index f6e99454cb1..611d161b104 100644 --- a/app/models/integrations/jira.rb +++ b/app/models/integrations/jira.rb @@ -401,9 +401,9 @@ module Integrations private def jira_issue_match_regex - return /\b#{jira_issue_prefix}(?<issue>#{Gitlab::Regex.jira_issue_key_regex})/ if jira_issue_regex.blank? + jira_regex = jira_issue_regex.presence || Gitlab::Regex.jira_issue_key_regex.source - Gitlab::UntrustedRegexp.new("\\b#{jira_issue_prefix}(?P<issue>#{jira_issue_regex})") + Gitlab::UntrustedRegexp.new("\\b#{jira_issue_prefix}(?P<issue>#{jira_regex})") end def parse_project_from_issue_key(issue_key) |