Feature #43528
open
Allow "RM-" to be used as a prefix for changesets
Added by Burak Can 3 days ago.
Updated 3 days ago.
Description
Currently, only "#tasknumber" is allowed for commit messages for connecting commits to specific tasks. This patch allows "RM-tasknumber" for connecting the commits.
Files
The patch is really small, but would be really helpful for us to connect out commits as we have used the "RM-" prefix standing for Redmine up until now:
diff --git a/app/models/changeset.rb b/app/models/changeset.rb
index b14b46bc4..8b1d79d33 100644
--- a/app/models/changeset.rb
+++ b/app/models/changeset.rb
@@ -144,7 +144,7 @@ class Changeset < ApplicationRecord
refs = match[3]
next unless action.present? || ref_keywords_any
- refs.scan(/#(\d+)(\s+@#{TIMELOG_RE})?/o).each do |m|
+ refs.scan(/(?:#|RM-)(\d+)(\s+@#{TIMELOG_RE})?/o).each do |m|
issue = find_referenced_issue_by_id(m[0].to_i)
hours = m[2]
if issue && !issue_linked_to_same_commit?(issue)
Also available in: Atom
PDF