Project

General

Profile

Actions

Defect #1322

closed

Error on project selection with numeric (only) identifier.

Added by Stefan Hühner over 16 years ago. Updated over 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Projects
Target version:
Start date:
2008-05-29
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

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.

Actions #1

Updated by Jean-Philippe Lang over 16 years ago

  • Status changed from New to Closed
  • Target version set to 0.7.2
  • Resolution set to Fixed

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

Actions

Also available in: Atom PDF