Can't create a series name like '1'

Bug #390776 reported by Michael Terry
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Launchpad itself
Fix Released
Low
Curtis Hovey

Bug Description

Trying to name a series a very short name, like '1' doesn't work ('19' or '132' work though). The error given doesn't actually describe why Launchpad won't let you name it that:

"Invalid name '1'. Names must start with a letter or number and be lowercase. The characters +, - and . are also allowed after the first character."

So, two possible resolutions, I guess:
1) Allow names to be one legal-character-long.
2) If you aren't willing to do that, fix the error message given to explain that series names can't be only one character.

Revision history for this message
Curtis Hovey (sinzui) wrote :

Update canonical.launchpad.validators.name.name_validator:
        message = _(dedent("""
            Invalid name '${name}'. Names must be at least two characters
            long, start with a letter or number and be lowercase. The
            characters <samp>+</samp>, <samp>-</samp> and <samp>.</samp> are
            also allowed after the first character."""),
            mapping={'name': escape(name)})

Changed in launchpad-registry:
importance: Undecided → Low
status: New → Triaged
tags: added: trivial
Revision history for this message
Michael Terry (mterry) wrote :

My *preferred* solution was to allow names of only one character. I'd feel better if I understood why the restriction exists. What's the rationale for it?

Small grammar fix in your suggested change: "two characters long, start with a letter" => "two characters long, starting with a letter"

Revision history for this message
Curtis Hovey (sinzui) wrote :

The launchpad name validator is for all names, not just product series. We really do no want 1 character names.

Revision history for this message
Michael Terry (mterry) wrote :

::shrug:: OK, just seems odd that a project can have a series "10" but not a series "1". One could always handle series names different than other names. But whatever, I can deal with the restriction.

Curtis Hovey (sinzui)
Changed in launchpad-registry:
assignee: nobody → Curtis Hovey (sinzui)
milestone: none → 2.2.7
status: Triaged → In Progress
Revision history for this message
Curtis Hovey (sinzui) wrote :

Fixed in launchpad devel r8706.

Changed in launchpad-registry:
status: In Progress → Fix Committed
Curtis Hovey (sinzui)
tags: added: story-series-milestones-releases
Revision history for this message
Curtis Hovey (sinzui) wrote : Bug 390776 Fix released

Fixed released in Launchpad 2.2.7.

Changed in launchpad-registry:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.