Closed
Bug 915972
Opened 12 years ago
Closed 12 years ago
[Buri][SMS][Contacts]The contact's name can't display in the recipient
Categories
(Firefox OS Graveyard :: Gaia::SMS, defect, P2)
Firefox OS Graveyard
Gaia::SMS
Tracking
(Not tracked)
RESOLVED
DUPLICATE
of bug 914103
People
(Reporter: sync-1, Unassigned)
Details
Attachments
(1 file)
|
29.72 KB,
image/png
|
Details |
Mozilla build ID:20130902041201
Created an attachment (id=515994)
Pic_The contact's name can't display in the recipient
DEFECT DESCRIPTION:
The contact's name can't display in the recipient
REPRODUCING PROCEDURES:
Pre:there is a contact in the contacts app(eg:name: lan、last name: cheng 、phone:15961768590)
1.Enter the SMS->Creat the new message->In the recipient area input phone numbers which matched the contact (15961768590)->edit the message,the contact's name can't display in the recipient ,only display phone numbrs-->ko
notes:when the recipient receive the message,the contact's name can display
EXPECTED BEHAVIOUR:
ko:the contact's name can display in the recipient
ASSOCIATE SPECIFICATION:
TEST PLAN REFERENCE:
TOOLS AND PLATFORMS USED:
USER IMPACT:
Medium
REPRODUCING RATE:
5/5
For FT PR, Please list reference mobile's behavior:
Comment 1•12 years ago
|
||
Sorry, I don't understand completely the STR. Let me explain:
Pre: have a contact 15961768590
1. launch sms
2. tap "new message" button
3. enter 15961768590 as a recipient
4. write the message
5. send the message (?)
6. => ?
Please fill-in the (?) :)
You can attach a screenshot and/or a video too.
Flags: needinfo?(sync-1)
(In reply to Julien Wajsberg [:julienw] from comment #1)
> Sorry, I don't understand completely the STR. Let me explain:
>
> Pre: have a contact 15961768590
> 1. launch sms
> 2. tap "new message" button
> 3. enter 15961768590 as a recipient
> 4. write the message
> 5. send the message (?)
> 6. => ?
>
> Please fill-in the (?) :)
>
> You can attach a screenshot and/or a video too.
It should be the name of that contact (like Jim or Lily...) if it has stored in contact database.
Flags: needinfo?(sync-1)
Comment 3•12 years ago
|
||
Please attach a screenshot and/or a video to make things easier for everyone.
Flags: needinfo?(sync-1)
Comment 6•12 years ago
|
||
ok, thanks, now I understand :)
so now we don't automatically add the contact name once you "close" the recipient.
To have the contact name in this view, you need to either:
* pick the contact using the "pick" button
* tap the contact in the suggestions list when it's displayed
So I think this is currently behaving as expected.
However, this is not unreasonable, so I've added this use case in bug 914103 comment 4 and I'm duping against bug 914103.
Thanks !
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → DUPLICATE
Comment 7•12 years ago
|
||
(In reply to 田旻 from comment #5)
> Actually, I have fixed this bug in my side.
Do you think you could share the patch with us ? I'm not very comfortable with adding unreviewed patches in the release.
diff --git a/apps/sms/js/recipients.js b/apps/sms/js/recipients.js
index e558934..10cb89a 100644
--- a/apps/sms/js/recipients.js
+++ b/apps/sms/js/recipients.js
@@ -893,13 +893,37 @@
if (isAcceptedRecipient) {
if (typed) {
// Push the accepted input into the recipients list
- view.owner.add({
- name: typed,
- number: typed,
- editable: editable,
- source: 'manual'
- });
+ /*view.owner.add({
+ name: typed,
+ number: typed,
+ editable: editable,
+ source: 'manual'
+ });*/
+ var nameT = typed;
+ var sourceT = 'manual';
+ var display = null;
+ Contacts.findByString(typed, function gotContact(contacts) {
+ if (contacts && contacts != '' && contacts[0].name &&
+ (contacts[0].name[0].trim().localeCompare(typed) == 0 || cont
+ nameT = contacts[0].name[0];
+ sourceT = 'contacts';
+ var info = Utils.getDisplayObject(nameT || null, contacts[0].
+ display = info.type +
+ info.separator +
+ info.carrier +
+ typed;
+ }
+ view.owner.add({
+ name: nameT,
+ number: typed,
+ editable: editable,
+ source: sourceT,
+ display: display
+ }).focus();
+ });
// Clear the displayed list
// Render the recipients as a fresh list
// Set focus on the very placeholder item.
(END)
Comment 9•12 years ago
|
||
Ayman, please see the attachment in comment 4 and the second point in bug 914103 comment 4.
Do you feel we can move forward with fixing this only in this bug (as we have a wip patch here) or should we wait for the bigger picture ?
Flags: needinfo?(aymanmaat)
Comment 10•12 years ago
|
||
tianm> could you please add the patch as an attachment ? Here you lost some texts on the right.
Comment 11•12 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #9)
> Ayman, please see the attachment in comment 4 and the second point in bug
> 914103 comment 4.
>
> Do you feel we can move forward with fixing this only in this bug (as we
> have a wip patch here) or should we wait for the bigger picture ?
from bug 914103 comment 4
'2. what happens if the user types a contact number and terminate it without tapping the contact in the suggestion list (bug 915972) ? Current behaviour is reasonable'
I agree that current behaviour is reasonable. We should move forwards with only fixing this bug (915972) as this is by far the most pressing issue.
Flags: needinfo?(aymanmaat)
Comment 12•12 years ago
|
||
diff --git a/apps/sms/js/recipients.js b/apps/sms/js/recipients.js
index e558934..10cb89a 100644
--- a/apps/sms/js/recipients.js
+++ b/apps/sms/js/recipients.js
@@ -893,13 +893,37 @@
if (isAcceptedRecipient) {
if (typed) {
// Push the accepted input into the recipients list
- view.owner.add({
- name: typed,
- number: typed,
- editable: editable,
- source: 'manual'
- });
+ //TCL_tianmin modified begin for bug#522962
+ /*view.owner.add({
+ name: typed,
+ number: typed,
+ editable: editable,
+ source: 'manual'
+ });*/
+ var nameT = typed;
+ var sourceT = 'manual';
+ var display = null;
+ Contacts.findByString(typed, function gotContact(contacts) {
+ if (contacts && contacts != '' && contacts[0].name &&
+ (contacts[0].name[0].trim().localeCompare(typed) == 0 || contacts[0].tel[0].value.localeCompare(typed) == 0)){
+ nameT = contacts[0].name[0];
+ sourceT = 'contacts';
+ var info = Utils.getDisplayObject(nameT || null, contacts[0].tel[0]);
+ display = info.type +
+ info.separator +
+ info.carrier +
+ typed;
+ }
+ view.owner.add({
+ name: nameT,
+ number: typed,
+ editable: editable,
+ source: sourceT,
+ display: display
+ }).focus();
+ });
+ //TCL_tianmin modified end for bug#522962
// Clear the displayed list
// Render the recipients as a fresh list
// Set focus on the very placeholder item.
Comment 13•12 years ago
|
||
(In reply to Julien Wajsberg [:julienw] from comment #10)
> tianm> could you please add the patch as an attachment ? Here you lost some
> texts on the right.
It's a difficult for us to access the github, thus I have to paste the patch here again.
Comment 14•12 years ago
|
||
(In reply to ayman maat :maat from comment #11)
> (In reply to Julien Wajsberg [:julienw] from comment #9)
> > Ayman, please see the attachment in comment 4 and the second point in bug
> > 914103 comment 4.
> >
> > Do you feel we can move forward with fixing this only in this bug (as we
> > have a wip patch here) or should we wait for the bigger picture ?
>
> from bug 914103 comment 4
>
> '2. what happens if the user types a contact number and terminate it without
> tapping the contact in the suggestion list (bug 915972) ? Current behaviour
> is reasonable'
>
> I agree that current behaviour is reasonable. We should move forwards with
> only fixing this bug (915972) as this is by far the most pressing issue.
If the contact has stored in the database, it's better return their name in the contact list. Then the sender could have a better view about who has selected as a receiver (not just a telephone number. )
Comment 15•12 years ago
|
||
After a discussion with Ayman, we agreed this is not a blocker for 1.2.
You need to log in
before you can comment on or make changes to this bug.
Description
•