プロジェクト

全般

プロフィール

Vote #65352

完了

Relative url for source links in notifications

Admin Redmine さんが4年以上前に追加. 4年以上前に更新.

ステータス:
Closed
優先度:
通常
担当者:
-
カテゴリ:
Email notifications_9
対象バージョン:
開始日:
2009/06/12
期日:
進捗率:

80%

予定工数:
category_id:
9
version_id:
84
issue_org_id:
3483
author_id:
5858
assigned_to_id:
1
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
63
ステータス-->[Closed]

説明

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.

Admin Redmine さんが4年以上前に更新

  • カテゴリEmail notifications_9 にセット
  • 対象バージョン2.5.2_84 にセット

他の形式にエクスポート: Atom PDF

いいね!0
いいね!0