Project

General

Profile

Actions

Patch #7445

closed

Patch for improved repository commit auto-updates

Added by Brian Lindahl about 13 years ago. Updated over 10 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
SCM
Target version:
-
Start date:
2011-01-25
Due date:
% Done:

80%

Estimated time:

Description

I found a need to have multiple forms of auto-updates for issues through repository commits. This patch changes the wording from 'commit_fix' to 'commit_update' to represent the fact that not all repository commits are 'fixes'. In addition, there are now 5 slots for auto-updates through repository commits.

One example of usage is that in my projects, repository commit messages can automatically move an issue through the following an advanced flow if the commit message contains the following keywords:

branches   --> move to 'In Progress'   used to indicate that work has started on an issue
implements --> move to 'Implemented'   used to indicate that an issue has been implemented
integrates --> move to 'Integrated'    used to indicate that an issue has been integrated back into an integration branch to await a future release
releases   --> move to 'Released'      used to indicate that an issue has made it into a release that has passed acceptance test
verifies   --> move to 'Closed'        used for internal verification before a release is given to a receiver

Having a large number of slots for commit message auto-updates has drastically reduced the burden on software engineers when it comes to using a defect tracking system, while still allowing a useful number of issue states from a management and lead perspective.


Files

commit-update-1.0.4.patch (11.6 KB) commit-update-1.0.4.patch Brian Lindahl, 2011-01-25 19:55
commit-update-1.1.0.patch (9.91 KB) commit-update-1.1.0.patch Brian Lindahl, 2011-01-26 22:14
commit-update-1.2.1.patch (10.2 KB) commit-update-1.2.1.patch Russell Frank, 2012-01-25 20:42
commit-update-1.4-stable.patch (10.5 KB) commit-update-1.4-stable.patch Déja Augustine, 2012-05-18 22:13

Related issues

Related to Redmine - Feature #1232: Referencing and fixing issues in commit messagesNew2008-05-13

Actions
Related to Redmine - Feature #4911: Multiple issue update rules with different keywords in commit messagesClosedJean-Philippe Lang2010-02-23

Actions
Actions #1

Updated by Brian Lindahl about 13 years ago

should have read:

branches   --> move to 'In Progress'   used to indicate that work has started on an issue
implements --> move to 'Implemented'   used to indicate that an issue has been implemented
integrates --> move to 'Integrated'    used to indicate that an issue has been integrated back into an integration branch to await a future release
releases   --> move to 'Released'      used to indicate that an issue has made it into a release that has passed acceptance test
verifies   --> move to 'Closed'        used for internal verification before a release is given to a receiver

Description updated accordingly on 2013-03-29

Actions #2

Updated by Brian Lindahl about 13 years ago

Improvements:
  • migrated to Redmine 1.1.0
  • improved the code to be a bit 'ruby' smarter
Actions #3

Updated by Adarsh Carter about 13 years ago

Excellent; thank you! Tested with 1.1.1; seems to work perfectly.

Actions #4

Updated by Troex Nevelin about 13 years ago

That is very useful, I would like to see it in redmine by default. I would suggest something like done10 #7445 to set progress 10%, done20 and so on, should be implemented by default and set 'Assigned'

Actions #5

Updated by Terence Mill about 13 years ago

Brian Lindahl wrote:

should have read:
[...]

Static strings are never a good solution at least in terms of localization.

A more general implementation would be to update the tickets in similar way as doing via email, mean you have to reference a ticket id and use the standard email update syntax on that.
eh.
status: In Progress

To have a better integration someone could define alias words for status in in the main workflow configuration, e.g

Status => Alias
In Progress => branches, working
Implemented => implements, coded
Released => releases
verifies => Closed

This way several alias for the status definition can be used in emails and commit messages to update tickets.

Actions #6

Updated by Etienne Massip about 13 years ago

  • Category set to SCM
Actions #7

Updated by Brian Lindahl about 13 years ago

Terence Mill wrote:

Static strings are never a good solution at least in terms of localization.

Which is why Redmine allows you to have multiple trigger words. For example, for French (not sure about translation accuracy) and English users:
verify, vérifier => Closed

Actions #8

Updated by Terence Mill over 12 years ago

+1

Actions #9

Updated by Russell Frank about 12 years ago

Here's the patch for 1.2.1

Actions #10

Updated by William Roush almost 12 years ago

+1 on this one, should be in Redmine by default.

Actions #11

Updated by Déja Augustine almost 12 years ago

Rolled a patch against Redmine 1.4-stable

I'm still testing it, but everything seems to be working just fine.

Actions #12

Updated by gc cg over 11 years ago

Can some one please help me with this issue.
I've just downloaded
1.4-stable: svn co http://redmine.rubyforge.org/svn/branches/1.4-stable redmine
cd to redmine dir
and download commit-update-1.4-stable.patch

then i run this command: patch -p0 < commit-update-1.4-stable.patch

I got lots of errors. What did i do wrong?

sh-4.1$ patch p0 < commit-update-1.4-stable.patch
patching file b/app/models/changeset.rb
Hunk #1 FAILED at 119.
Hunk #2 FAILED at 132.
Hunk #3 FAILED at 217.
Hunk #4 FAILED at 231.
4 out of 4 hunks FAILED -
saving rejects to file b/app/models/changeset.rb.rej
patching file b/app/views/settings/_repositories.html.erb
Hunk #1 FAILED at 68.
1 out of 1 hunk FAILED -- saving rejects to file b/app/views/settings/_repositories.html.erb.rej
patching file b/config/locales/en.yml
Hunk #1 FAILED at 343.
Hunk #2 FAILED at 932.
2 out of 2 hunks FAILED -- saving rejects to file b/config/locales/en.yml.rej
patching file b/config/settings.yml
Hunk #1 FAILED at 94.
1 out of 1 hunk FAILED -- saving rejects to file b/config/settings.yml.rej

thanks a lot

Actions #13

Updated by gc cg over 11 years ago

I manually apply the patch (by hand on each file0 and it works.

thanks

Actions #14

Updated by Carlo Ruggiero about 11 years ago

this patch saved my life! (And its warking even on 2.3-stable)
should be integrated as a fix!

Thanks

Actions #15

Updated by Etienne Massip about 11 years ago

  • Description updated (diff)
Actions #16

Updated by Jean-Philippe Lang over 10 years ago

  • Status changed from New to Closed

Superseded by r12197 which allows unlimited keywords/rules.

Actions

Also available in: Atom PDF