redmine: upgrade to 4.2

Change-Id: I38b3ee8c47f22c601c3a26c5c7238ac8bebe33a8
This commit is contained in:
Harald Welte 2021-10-27 19:09:27 +02:00
parent a07f803328
commit c18597226c
2 changed files with 15 additions and 11 deletions

View File

@ -1,4 +1,4 @@
FROM redmine:4.1-passenger
FROM redmine:4.2-passenger
RUN apt-get update && \
apt-get install -y --no-install-recommends \

View File

@ -1,18 +1,22 @@
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index 4256f0589..b5ef7b298 100644
index f1580ce33..748c66ddc 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -126,11 +126,11 @@ class Changeset < ActiveRecord::Base
referenced_issues = []
- comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i) do |match|
+ comments.scan(/([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?(OS#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+#\d+(\s+@#{TIMELOG_RE})?)*)(?=[[:punct:]]|\s|<|$)/i) do |match|
action, refs = match[2].to_s.downcase, match[3]
@@ -136,7 +136,7 @@ class Changeset < ActiveRecord::Base
regexp =
%r{
([\s\(\[,-]|^)((#{kw_regexp})[\s:]+)?
- (\#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+\#\d+(\s+@#{TIMELOG_RE})?)*)
+ (OS\#\d+(\s+@#{TIMELOG_RE})?([\s,;&]+\#\d+(\s+@#{TIMELOG_RE})?)*)
(?=[[:punct:]]|\s|<|$)
}xi
comments.scan(regexp) do |match|
@@ -144,7 +144,7 @@ class Changeset < ActiveRecord::Base
refs = match[3]
next unless action.present? || ref_keywords_any
- refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
+ refs.scan(/OS#(\d+)(\s+@#{TIMELOG_RE})?/).each do |m|
issue, hours = find_referenced_issue_by_id(m[0].to_i), m[2]
issue = find_referenced_issue_by_id(m[0].to_i)
hours = m[2]
if issue && !issue_linked_to_same_commit?(issue)
referenced_issues << issue