プロジェクト

全般

プロフィール

Vote #72820

完了

Version date field regex validation accepts invalid date

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

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

0%

予定工数:
category_id:
22
version_id:
59
issue_org_id:
12359
author_id:
66856
assigned_to_id:
1
comments:
5
status_id:
5
tracker_id:
1
plus1:
0
affected_version:
closed_on:
affected_version_id:
58
ステータス-->[Closed]

説明

Version date field regexp validation accepts invalid dates like "2012-11-33". Stored value is nil and no validation errors.

I attached a proposed patch that fixes this bug.


journals

Why not try @User.current.time_zone.parse(effective_date_before_type_cast)@?

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

--------------------------------------------------------------------------------
Etienne Massip wrote:
> Why not try @User.current.time_zone.parse(effective_date_before_type_cast)@?

I just read that "Redmine only supports YYYY-MM-DD format for entering dates".
I read that at #10560#note-2
A similar bug was fixed in r7779 with the same method.
--------------------------------------------------------------------------------
Fix committed in r10810 with slight changes, thanks.
--------------------------------------------------------------------------------
Merged in 2.1-stable.
--------------------------------------------------------------------------------


related_issues

relates,Closed,9394,Custom date field only validating on regex and not a valid date

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

  • カテゴリRoadmap_22 にセット
  • 対象バージョン2.1.3_59 にセット

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

いいね!0
いいね!0