プロジェクト

全般

プロフィール

Vote #63337

完了

In Activity views, changesets titles can be multiline while they should not

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

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

0%

予定工数:
category_id:
18
version_id:
4
issue_org_id:
1356
author_id:
809
assigned_to_id:
1
comments:
4
status_id:
5
tracker_id:
3
plus1:
0
affected_version:
closed_on:
affected_version_id:
ステータス-->[Closed]

説明

This concerns both HTML view and Atom feed.

Are concerned entries for repository changeset whose content is

  • multiline
  • first line is short

I can't find an example in Redmine.org development Activity timeline, because Jean-Philippe usualy does not commit with such a changelog, so here is a example :

This commit fixes :
 - #13
 - #34

In this case, truncate would return a truncated string, no matter if it contains newlines. This multilines string end up raw, in XML section of the feed, and in the section of the Html activity page. While the later seem to be properly rendered by web engines, the former makes many feedreaders choke and display erroneous data, mixing fields. I'm not sure what the RFC says about it, but I'm sure most newsreaders are not designed to handle multilines titles.

Attached patch is one working solution and works on my instance. It uses a helper, very similar to truncate, but ensuring truncated string is NOT multiline. Feel free to comment.


journals

An other solution would be to simply replace \n with a space.
What do you think ?
--------------------------------------------------------------------------------
Jean-Philippe, this would fix the problem equally well, it is only a matter of taste. Mine is that a space is a char already used very often, so I find it hard to guess which spaces are genuine and which are not. How about " \ " or " / " or " ^ " or " - " or " > " ?
In any case, that will be a matter of taste and fix the problem, so just pick up the one you prefer. Ask for another patch if you want.
--------------------------------------------------------------------------------
Paul, your patch should define format_truncate_single_line in ApplicationHelper since atom feeds may be rendered from any controller (not just ProjectsController).
Anyway, fix is applied in r1491 usings spaces.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------


related_issues

relates,Confirmed,34025,Issue subject truncated to 100 chars in the list from Projects > View all issues > Atom

Admin Redmine さんが約4年前に更新

  • カテゴリFeeds_18 にセット
  • 対象バージョン0.7.2_4 にセット

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

いいね!0
いいね!0