Project

General

Profile

Actions

Defect #29918

closed

Related issues section ignores the date format setting

Defect #29918: Related issues section ignores the date format setting

Added by Go MAEDA about 8 years ago. Updated almost 8 years ago.

Status:
Closed
Priority:
Normal
Category:
UI
Target version:
Resolution:
Fixed
Affected version:

Description

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.


Files

incorrect-date-format@2x.png (41.2 KB) incorrect-date-format@2x.png Go MAEDA, 2018-11-07 08:58

Related issues 1 (0 open — 1 closed)

Related to Redmine - Feature #3425: View progress bar of related issuesClosedJean-Philippe LangActions

Updated by Mizuki ISHIKAWA about 8 years ago Actions #1

The following changes should solve the problem.

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}",

Updated by Go MAEDA about 8 years ago Actions #2

  • Target version set to 4.1.0

LGTM. Setting the target version to 4.1.0.

Updated by Go MAEDA about 8 years ago Actions #3

  • Related to Feature #3425: View progress bar of related issues added

Updated by Go MAEDA about 8 years ago Actions #4

  • Target version changed from 4.1.0 to 3.4.7
  • Affected version set to 3.4.0

format_date was removed in r15981 (#3425).

Updated by Marius BĂLTEANU almost 8 years ago Actions #5

We should add some assertions to source:trunk/test/functional/issues_controller_test.rb#L1215 just to be sure that will not reproduce anymore.

Updated by Jean-Philippe Lang almost 8 years ago Actions #6

  • Status changed from New to Resolved
  • Assignee set to Jean-Philippe Lang
  • Resolution set to Fixed

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?

Updated by Jean-Philippe Lang almost 8 years ago Actions #7

  • Status changed from Resolved to Closed

Updated by Marius BĂLTEANU almost 8 years ago Actions #8

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.

Actions

Also available in: PDF Atom