プロジェクト

全般

プロフィール

Vote #63305

完了

Error on project selection with numeric (only) identifier.

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

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

0%

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

説明

Hi,

if an identifier is used which only contains numbers, then the selection of an project from the project list does not work because the projects-controller uses the identifier value as an id.

Error occurs in revision 0.7.1 (r1640)

In app/models/project.rb line 137, method self.find:
The param is matched this "/\d*$/" regex. When it matches, then the param is used to search in the id. So numeric only identifiers do not work, because their value matches this regex.

The validation for the identifier field "/[a-z0-9-]*$/" should be extended to force a least one non-numeric character and the issue perhaps noted in the release-notes, as numeric-only identifiers already present in the db must be corrected manually.


journals

> if an identifier is used which only contains numbers, then the selection of an project from the project list does not work because the projects-controller uses the identifier value as an id.

Fixed in r1473. If the identifier of a given project is numeric, its id will be used in urls instead.

> The validation for the identifier field "/^[a-z0-9\-]*$/" should be extended to force a least one non-numeric character

You can no longer create a project with a numeric identifier.
See source:/trunk/app/models/project.rb@1472#L247
--------------------------------------------------------------------------------

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

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

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

いいね!0
いいね!0