Opened 6 years ago

Closed 6 years ago

Last modified 4 years ago

#12613 closed (fixed)

phone2numeric doesn't convert the letters 'Q' or 'Z'.

Reported by: gabrielhurley Owned by: gabrielhurley
Component: Template system Version: 1.1
Severity: Keywords: phone2numeric
Cc: Triage Stage: Accepted
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

Discussion on the django developers group here: http://groups.google.com/group/django-developers/browse_frm/thread/49ee1863efa59901

There doesn't seem to be any good reason for the phone2numeric function not to convert the letters Q or Z, so I've created a small patch that remedies that.

Also, for readability's sake the patch puts the dictionary of letter-to-number conversions in alphabetical order.

Attachments (2)

phone2numeric_complete.diff (1.1 KB) - added by gabrielhurley 6 years ago.
Adds support for Q and Z in the phone2numeric function.
phone2numeric_complete_test.diff (1022 bytes) - added by gabrielhurley 6 years ago.
Adds test for phone2numeric that uses a full English pangram plus hyphen and exclamation point.

Download all attachments as: .zip

Change History (8)

Changed 6 years ago by gabrielhurley

Adds support for Q and Z in the phone2numeric function.

comment:1 Changed 6 years ago by gabrielhurley

  • Owner changed from nobody to gabrielhurley
  • Status changed from new to assigned

comment:2 Changed 6 years ago by ericholscher

  • Needs tests set
  • Triage Stage changed from Unreviewed to Accepted

Could use a test that breaks currently and passes with the patch.

Changed 6 years ago by gabrielhurley

Adds test for phone2numeric that uses a full English pangram plus hyphen and exclamation point.

comment:3 Changed 6 years ago by gabrielhurley

  • Needs tests unset

comment:4 Changed 6 years ago by russellm

  • Resolution set to fixed
  • Status changed from assigned to closed

(In [12427]) [1.1.X] Fixed #12613 -- Added Q and Z to the list of characters supported by the phone2numeric filter. Thanks to gabrielhurley for the report and patch.

Backport of r12425 from trunk.

comment:5 Changed 6 years ago by russellm

(In [12425]) Fixed #12613 -- Added Q and Z to the list of characters supported by the phone2numeric filter. Thanks to gabrielhurley for the report and patch.

comment:6 Changed 4 years ago by jacob

  • milestone 1.2 deleted

Milestone 1.2 deleted

Note: See TracTickets for help on using tickets.
Back to Top