Project

General

Profile

Actions

Feature #43528

open

Allow "RM-" to be used as a prefix for changesets

Added by Burak Can 3 days ago. Updated 3 days ago.

Status:
New
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:

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

patch.patch (559 Bytes) patch.patch Burak Can, 2025-11-26 09:57
Actions #1

Updated by Burak Can 3 days ago

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)

Actions

Also available in: Atom PDF