aboutsummaryrefslogtreecommitdiffstats
path: root/redmine/commitlog-references-oshash.diff
blob: e7b4cf8817ba7693e6b3c00ec6b37f255dd69fa8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index f1580ce33..748c66ddc 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -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 = find_referenced_issue_by_id(m[0].to_i)
         hours = m[2]
         if issue && !issue_linked_to_same_commit?(issue)