Closed Bug 862232 Opened 7 years ago Closed 7 years ago

[OPEN_][SMS]when we send a message to a contact whose number contains "0", the "0" will be deleted


(Firefox OS Graveyard :: General, defect)

Gonk (Firefox OS)
Not set


(blocking-b2g:tef+, firefox21 wontfix, firefox22 wontfix, firefox23 fixed, b2g18 fixed, b2g18-v1.0.0 wontfix, b2g18-v1.0.1 fixed)

blocking-b2g tef+
Tracking Status
firefox21 --- wontfix
firefox22 --- wontfix
firefox23 --- fixed
b2g18 --- fixed
b2g18-v1.0.0 --- wontfix
b2g18-v1.0.1 --- fixed


(Reporter: Firefox_Mozilla, Assigned: janjongboom)


(Whiteboard: [fixed-in-birch])


(2 files)

Steps to reproduce:
1. go into SMS;
2. edit a message and input a contact whose number contains "0"
1.send successful and that contact can receive this message.
1.send successful, but the number of this contact is replaced. the "0" in number is deleted and that contact can not receive this message.
2.for example, we send a message to 15955042864. After we send message, the number of addressee becomes +861595542864.

build information:
gaia commit:
3e7dda8 Merge pull request #9142 from asutherland/land-drafts-backend-v1.0.1
gecko commit:
d7a6db4 Bug 860892 - IPC failure handling in CompositorChild and ShadowLayers. r=jmuizelaar, a=tef+
blocking-b2g: --- → tef?
Assignee: nobody → janjongboom
Blocking already, but also adding qawanted to make sure we're able to repro.
blocking-b2g: tef? → tef+
Keywords: qawanted
Hi, what kind of phone number is this, or from which country are you using the phone? Is it supposed to be Vietnamese (because of the +86)? As it doesn't validate as a Vietnamese local phone number.
Flags: needinfo?(Firefox_Mozilla)
I know I can send sms to my french phone with the local number (ie starting with 0) quite easily...

Maybe a Commercial RIL bug ?
Suspecting a bug in PhoneNumber.js, but I need more info on the environment that this happens.
Whiteboard: [status: waiting for QA reproduction]
QA Contact: pyang
We use the China Unicom or China Mobile sim card. Phone number contain number "0", such as 15955042864. If we input this number into addressee in SMS and send, the Phone number is changed. But if we input the number which does not contain "0"(such as 18651655251), this number does not be changed.
Flags: needinfo?(Firefox_Mozilla)
Just try to reproduce on unagi, build number 20130416230204
send message to number 693222087 (phone number of Spain)
The zero will not be deleted and message sent successfully
Verified bug in PhoneNumber.js.

Formatting 15955042864 in PhoneNumber.js with locale CN will format as +86 15 9554 2864.
Ever confirmed: true
Attached file Patch
The nationalPrefixForParsing for China is (1[1279]\d{3})|0. We make this into a regex by prefixing this with ^. Because the |0 the first 0 is matched if the first group is not matched at pos 0.


I wrap the regex'es now in a non matching group so we don't have this problem anymore.
Attachment #738463 - Flags: review?(gal)
Keywords: qawanted
Whiteboard: [status: waiting for QA reproduction] → [status: waiting for review]
Attachment #738463 - Flags: review?(gal) → review?(anygregor)
Attachment #738463 - Flags: review?(anygregor) → review+
Attachment #738463 - Attachment is patch: false
Attached patch hg patchSplinter Review
Attachment #738891 - Flags: review+
Whiteboard: [status: waiting for review] → checkin-needed
moving to general so that Ryan can evnetually find this.
Component: Gaia::SMS → General
Flags: in-testsuite+
Whiteboard: checkin-needed → [fixed-in-birch]
Can I now close this bug?
Closed: 7 years ago
Resolution: --- → FIXED
Resolution: FIXED → ---
Closed: 7 years ago7 years ago
Resolution: --- → FIXED
Attachment mime type: text/plain → text/x-github-pull-request
You need to log in before you can comment on or make changes to this bug.