プロジェクト

全般

プロフィール

Vote #65007

完了

Issue with two digit year on Logtime

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

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

0%

予定工数:
category_id:
13
version_id:
60
issue_org_id:
3107
author_id:
3145
assigned_to_id:
1
comments:
6
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
66
ステータス-->[Closed]

説明

I entered a two digit year in Logtime. The result was that the year showed up as 0009 instead of 2009.

I am using Redmine 0.8.0.devel.2643 (MySQL)


journals

!TwoDigitYear.JPG!
--------------------------------------------------------------------------------
That's how the ruby Date#parse method behaves:

<pre>
irb(main):003:0> Date.parse("09-02-04").year
=> 9
irb(main):004:0> Date.parse("2009-02-04").year
=> 2009
</pre>

I don't know if it's worth hacking it.
--------------------------------------------------------------------------------
If possible, Lock the date fields from entering the values manually & let the user to select from the Calendar control will prevent this issue.

In my observation, most of the users are using the Calendar control.
--------------------------------------------------------------------------------
This is still reproduceable. I checked this and can confirm this on current trunk.

Jean Philippe wrote:
> I don't know if it's worth hacking it.

The validation should be improved or the datefield should only allow 4 digit years. The method doesn't need to be hacked. But it should be validated in the correct way to prepend such an entry.

I set it as a candidate for the next minor release as this could cause misleading timelogs.
--------------------------------------------------------------------------------
Fixed in r11472. Same validations than issue start/due dates are applied and "09-02-04" is no longer considered as valid.
--------------------------------------------------------------------------------
Merged.
--------------------------------------------------------------------------------

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

  • カテゴリTime tracking_13 にセット
  • 対象バージョン2.3.0_60 にセット

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

いいね!0
いいね!0