Mercurial > hg > soundsoftware-site
diff app/models/changeset.rb @ 931:ec1c49528f36 cannam_integration
Merge from branch "redmine-1.3"
author | Chris Cannam |
---|---|
date | Wed, 27 Jun 2012 15:04:58 +0100 |
parents | 5e80956cc792 5f33065ddc4b |
children | bb32da3bea34 |
line wrap: on
line diff
--- a/app/models/changeset.rb Wed Jun 27 14:56:14 2012 +0100 +++ b/app/models/changeset.rb Wed Jun 27 15:04:58 2012 +0100 @@ -151,12 +151,16 @@ @long_comments || split_comments.last end - def text_tag - if scmid? + def text_tag(ref_project=nil) + tag = if scmid? "commit:#{scmid}" else "r#{revision}" end + if ref_project && project && ref_project != project + tag = "#{project.identifier}:#{tag}" + end + tag end # Returns the previous changeset @@ -213,7 +217,7 @@ # don't change the status is the issue is closed return if issue.status && issue.status.is_closed? - journal = issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, text_tag)) + journal = issue.init_journal(user || User.anonymous, ll(Setting.default_language, :text_status_changed_by_changeset, text_tag(issue.project))) issue.status = status unless Setting.commit_fix_done_ratio.blank? issue.done_ratio = Setting.commit_fix_done_ratio.to_i @@ -232,7 +236,7 @@ :hours => hours, :issue => issue, :spent_on => commit_date, - :comments => l(:text_time_logged_by_changeset, :value => text_tag, + :comments => l(:text_time_logged_by_changeset, :value => text_tag(issue.project), :locale => Setting.default_language) ) time_entry.activity = log_time_activity unless log_time_activity.nil?