プロジェクト

全般

プロフィール

Vote #79630

完了

Related issues section ignores the date format setting

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

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

0%

予定工数:
category_id:
10
version_id:
143
issue_org_id:
29918
author_id:
332
assigned_to_id:
1
comments:
8
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
119
ステータス-->[Closed]

説明

Start date and due date in the related issues section are always displayed in the format YYYY-MM-DD regardless of the date format setting.

!{width: 773px; border: 1px solid #ccc;}.incorrect-date-format@2x.png!


journals

The following changes should solve the problem.
<pre><code class="diff">
diff --git a/app/helpers/issues_helper.rb b/app/helpers/issues_helper.rb
index e1e0fc559b..f71eb13b23 100644
--- a/app/helpers/issues_helper.rb
+++ b/app/helpers/issues_helper.rb
@@ -129,8 +129,8 @@ module IssuesHelper
content_tag('td', check_box_tag("ids[]", other_issue.id, false, :id => nil), :class => 'checkbox') +
content_tag('td', relation.to_s(@issue) {|other| link_to_issue(other, :project => Setting.cross_project_issue_relations?)}.html_safe, :class => 'subject', :style => 'width: 50%') +
content_tag('td', other_issue.status, :class => 'status') +
- content_tag('td', other_issue.start_date, :class => 'start_date') +
- content_tag('td', other_issue.due_date, :class => 'due_date') +
+ content_tag('td', format_date(other_issue.start_date), :class => 'start_date') +
+ content_tag('td', format_date(other_issue.due_date), :class => 'due_date') +
content_tag('td', other_issue.disabled_core_fields.include?('done_ratio') ? '' : progress_bar(other_issue.done_ratio), :class=> 'done_ratio') +
content_tag('td', buttons, :class => 'buttons'),
:id => "relation-#{relation.id}",
</code></pre>

--------------------------------------------------------------------------------
LGTM. Setting the target version to 4.1.0.
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
@format_date@ was removed in r15981 (#3425).
--------------------------------------------------------------------------------
We should add some assertions to source:trunk/test/functional/issues_controller_test.rb#L1215 just to be sure that will not reproduce anymore.
--------------------------------------------------------------------------------
Patch committed, thanks. I also added a test as suggested by Marius.

BTW, in the subtasks list, we display the subject, status, +assignee+ and done ratio. In the related issues list, we display the subject, status, +start date, due date+ and done ratio. Shouldn't we display the same attributes in both lists?
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
Jean-Philippe Lang wrote:
>
> BTW, in the subtasks list, we display the subject, status, +assignee+ and done ratio. In the related issues list, we display the subject, status, +start date, due date+ and done ratio. Shouldn't we display the same attributes in both lists?

Indeed, could be an improvement, but I think that it'll be better to make the attributes configurable because the use cases and the relevant information depends from instance to instance. For example, in my production environment, we modified the view in order to show the subject, status, assignee, *estimated* and *spent* because we do not use done ratio, start date and due date. Also, other users requested this, please see #11969 and #5130.

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


related_issues

relates,Closed,3425,View progress bar of related issues

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

  • カテゴリUI_10 にセット
  • 対象バージョン3.4.7_143 にセット

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

いいね!0
いいね!0