Phone Attribute Values do not include country code #3760
Labels
Fixed in v17.0
Priority: High
Affects most production Rock installs in a way that will be noticed.
Status: Confirmed
It's clear what the subject of the issue is about, and what the resolution should be.
Topic: Rock Internals
Related to internal core stuff.
Type: Bug
Confirmed bugs or reports that are very likely to be bugs.
Description
When you define an Attribute to be of type Phone Number, and you have more than one country code defined for your Rock server (example +1 for America, +81 for Japan), then the country code information is lost when you save the value.
The Phone Field Type stores only the Phone Number (e.g.
(800) 555-1234
), so when you then later try to view or re-edit the phone number, you don't know what country code it was saved using.Steps to Reproduce
Phone Country Code
type81
,Japan Test
,^(\d{2})(\d{4})(\d{4})$
,$1-$2-$3
Phone Test
, Field Type =Phone Number
. Save.81
and enter number1122223333
(it should auto-format as11-2222-3333
.Phone Test
value again and note that it has changed the country code to1
.Expected behavior:
The country code should be remembered.
Actual behavior:
Country code is lost.
Suggested Fix:
I would think the fix would be that if more than one country code exists in the system then store the country code along with the formatted number. Example:
+81 11-2222-3333
One potential problem to this would be if somebody has defined a formatting regular expression to include the country code already, they would then get the country code twice. But we could probably overcome that by checking if the formatted number begins with
81
or+81
before prepending the+81
.Versions
The text was updated successfully, but these errors were encountered: