Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Phone Attribute Values do not include country code #3760

Closed
cabal95 opened this issue Jun 21, 2019 · 0 comments
Closed

Phone Attribute Values do not include country code #3760

cabal95 opened this issue Jun 21, 2019 · 0 comments
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.

Comments

@cabal95
Copy link
Member

cabal95 commented Jun 21, 2019

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

  1. Go to General Settings, Defined Types
  2. Edit the Phone Country Code type
  3. Add a second country code: 81, Japan Test, ^(\d{2})(\d{4})(\d{4})$, $1-$2-$3
  4. Now go to General Settings, Global Attributes
  5. Add a new attribute called Phone Test, Field Type = Phone Number. Save.
  6. Edit the attribute value (not the pencil, just the normal row click)
  7. Set the Country code to 81 and enter number 1122223333 (it should auto-format as 11-2222-3333.
  8. Save.
  9. Reload the page (important! there is an unrelated bug where it isn't properly re-setting the country code in the drop down during postback).
  10. Edit the Phone Test value again and note that it has changed the country code to 1.

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

  • Rock Version: git-2019-06-21
  • Client Culture Setting: en-US
@cabal95 cabal95 added Type: Bug Confirmed bugs or reports that are very likely to be bugs. Status: Confirmed It's clear what the subject of the issue is about, and what the resolution should be. Priority: High Affects most production Rock installs in a way that will be noticed. Topic: Rock Internals Related to internal core stuff. labels Jun 21, 2019
@sparkdevnetwork-service sparkdevnetwork-service added the Status: In Dev Queue This issue is being worked on, and has someone assigned. label Sep 14, 2023
@MrUpsideDown MrUpsideDown added Fixed in v17.0 and removed Status: In Dev Queue This issue is being worked on, and has someone assigned. labels Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
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.
Projects
None yet
Development

No branches or pull requests

5 participants