Vote #65352
完了Relative url for source links in notifications
80%
説明
The email of an issue that includes a "source:" link is included in the email as a relative link ala:
source:...
The link needs to be made absolute.
Not sure if this applies to other links besides source: links..
Ruby version 1.8.6 (i386-mswin32)
RubyGems version 1.3.1
Rails version 2.1.2
journals
This issue should be resolved with the attached patch.
The @link_to@ for source: and export: links wasn't setting @:only_path => only_path@, so the links weren't being converted to absolute links in emails, etc..
<pre>
Index: app/helpers/application_helper.rb
===================================================================
--- app/helpers/application_helper.rb (revision 2879)
+++ app/helpers/application_helper.rb (working copy)
@@ -527,7 +527,7 @@
if project && project.repository
name =~ %r{^[/\\]*(.*?)(@([0-9a-f]+))?(#(L\d+))?$}
path, rev, anchor = $1, $3, $5
- link = link_to h("#{prefix}:#{name}"), {:controller => 'repositories', :action => 'entry', :id => project,
+ link = link_to h("#{prefix}:#{name}"), {:only_path => only_path, :controller => 'repositories', :action => 'entry', :id => project,
:path => to_path_param(path),
:rev => rev,
:anchor => anchor,
</pre>
Please also see Feature #4052 for additional enhancements to source and export links, as well as enhancements to commit, and revision links from #3346.
--Bill
--------------------------------------------------------------------------------
I tested it with this comment. I was able to reproduce it. I get a mail with some invalid link. This should be corrected.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
Patch applied in r13219, thanks.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
related_issues
relates,New,4052,Cross-project redmine links with alternate link text for source and export links.