Skip to content

hotfix - #3

Open
Pavaea wants to merge 1 commit into
mboremski:masterfrom
Pavaea:fix
Open

hotfix#3
Pavaea wants to merge 1 commit into
mboremski:masterfrom
Pavaea:fix

Conversation

@Pavaea

@Pavaea Pavaea commented Feb 9, 2026

Copy link
Copy Markdown

No description provided.

# 2. Den Identifier gegen die Regex prüfen
unless regex.match(identifier)
# Fehlermeldung ausgeben, wenn es nicht passt
errors.add(:identifier, "entspricht nicht dem erforderlichen Muster (#{regex_string})")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  • german string should be a label
  • throwing the complete (potential multiline) regex here might result in an unreadable error-message

end
rescue RegexpError => e
# Falls die eingegebene Regex im Admin-Bereich ungültig ist
errors.add(:identifier, "konnte nicht geprüft werden, da die Regex ungültig ist.")

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

german string should be a label

Comment thread init.rb
Comment on lines +18 to +25
require_dependency File.expand_path('../lib/redmine_regexidentifier/project_patch', __FILE__)
unless Project.included_modules.include?(RedmineRegexidentifier::ProjectPatch)
Project.send(:include, RedmineRegexidentifier::ProjectPatch)
# Diese Zeile MUSST du in den Docker-Logs sehen
puts "================================================"
puts "!!! REGEX-PLUGIN: Patch wurde geladen !!!"
puts "================================================"
end No newline at end of file

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The change works as a workaround, but I’d prefer to keep the initialization inside a Rails.configuration.to_prepare (or a similar hook) to stay closer to the usual Redmine/Rails plugin pattern.
The explicit included_modules check is nice and helps to avoid double includes, so that part looks good to me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants