Closed Bug 889245 Opened 12 years ago Closed 12 years ago

[Call log] When user make a voicemail or emergency call, call log shows only number

Categories

(Firefox OS Graveyard :: Gaia::Dialer, defect, P2)

ARM
Gonk (Firefox OS)

Tracking

(blocking-b2g:leo+, b2g18 fixed, b2g-v1.1hd fixed)

RESOLVED FIXED
1.1 QE4 (15jul)
blocking-b2g leo+
Tracking Status
b2g18 --- fixed
b2g-v1.1hd --- fixed

People

(Reporter: leo.bugzilla.gaia, Assigned: gerard-majax)

References

Details

(Whiteboard: [u=commsapps-user c=dialer p=1] )

Attachments

(2 files, 2 obsolete files)

1. Title : When user make a emergency call or voicemail, call log shows only number 2. Precondition : Set voicemail number 3. Tester's Action : make a emergency call or voicemail 4. Detailed Symptom : call log shows only number 5. Expected : call log shows "Emergency call" or "Voicemail" 6. Reproducibility: Y 1) Frequency Rate : 100% 7. Gaia Master/v1-train : Reproduce 8. Gaia Revision : f2d6ed54a236e6e3b94f0abad9f0dacb8a1cc7b3 9. Personal email id : promise09th@gmail.com
Priority: -- → P2
Assignee: nobody → anthony
Blocks: 890205
Splitting this bug into two different because the changes involved are very different.
Summary: [Call log] When user make a emergency call or voicemail, call log shows only number → [Call log] When user make a voicemail call, call log shows only number
Pointer to Github pull-request
Attachment #771251 - Flags: review?(etienne)
Unassigning myself as I'm on PTO. I'll email around to find someone who could finish this.
Assignee: anthony → nobody
Whiteboard: [u=commsapps-user c=dialer p=0]
Assignee: nobody → lissyx+mozillians
I'll handle review changes.
Whiteboard: [u=commsapps-user c=dialer p=0] → [u=commsapps-user c=dialer p=1]
With the current patch, the Voicemail string is added only when we open the call log from the database, i.e., there is no Voicemail label when you check the call log right after making the call and not killing the application. Are you fine with that ? I'd doubt so, but I want to make sure.
Flags: needinfo?(firefoxos-ux-bugzilla)
(In reply to Alexandre LISSY :gerard-majax from comment #5) > With the current patch, the Voicemail string is added only when we open the > call log from the database, i.e., there is no Voicemail label when you check > the call log right after making the call and not killing the application. > > Are you fine with that ? I'd doubt so, but I want to make sure. I found a way to handle this case.
Flags: needinfo?(firefoxos-ux-bugzilla)
Please find attached a link to the Github pull request https://github.com/mozilla-b2g/gaia/pull/10865 Main change of this pull request upon the previous one is that we enforce the isVoicemailNumber when adding the call to the live call log, thus ensuring that the correct display is performed without needing to reload the database.
Attachment #771251 - Attachment is obsolete: true
Attachment #771251 - Flags: review?(etienne)
Attachment #772635 - Flags: review?(etienne)
After discussing with etienne, we decided to put both voicemail and emergency booleans in the database to simplify the code. However, I'm currently unsure whether we can make an upgrade path that can handle detecting that a number is a voicemail number: we need to load voicemail.js for this, and LazyLoad gets in the way of indexedDB and makes the transaction failing.
(In reply to Alexandre LISSY :gerard-majax from comment #9) > After discussing with etienne, we decided to put both voicemail and > emergency booleans in the database to simplify the code. > > However, I'm currently unsure whether we can make an upgrade path that can > handle detecting that a number is a voicemail number: we need to load > voicemail.js for this, and LazyLoad gets in the way of indexedDB and makes > the transaction failing. Please note that this means we would not be able to have a consistent display (i.e. show « Voicemail » label in the call log) until the next call to this number is placed.
(In reply to Alexandre LISSY :gerard-majax from comment #10) > (In reply to Alexandre LISSY :gerard-majax from comment #9) > > After discussing with etienne, we decided to put both voicemail and > > emergency booleans in the database to simplify the code. > > > > However, I'm currently unsure whether we can make an upgrade path that can > > handle detecting that a number is a voicemail number: we need to load > > voicemail.js for this, and LazyLoad gets in the way of indexedDB and makes > > the transaction failing. > > Please note that this means we would not be able to have a consistent > display (i.e. show « Voicemail » label in the call log) until the next call > to this number is placed. Updated pull request, this is getting mitigated, but I still have the issue that on the first load, when doing database upgrade, the display is not correct for "Voicemail". Killing then restarting the app and getting to call log again gives a correct voicemail label.
Finally we go back to a simpler migration. While detecting on the fly that the number is a Voicemail one could be good, it is not possible to be performed during the upgradeneeded transaction (Voicemail.check() callback makes us losing the transaction).
Summary: [Call log] When user make a voicemail call, call log shows only number → [Call log] When user make a voicemail or emergency call, call log shows only number
Comment on attachment 772635 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 Commented on github. Main issues are: - the breakage of the tests - the async code issue (LazyL10n related) Cheers!
Attachment #772635 - Flags: review?(etienne) → review-
Attachment #772635 - Attachment is obsolete: true
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 The link in the attachment was pointing to the wrong pull request.
Attachment #777824 - Attachment description: bug889245.html → Link to Github https://github.com/mozilla-b2g/gaia/pull/10865
Attachment #777824 - Flags: review?(etienne)
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 Stealing the review as Etienne is on PTO. One small detail left to fix, commented on the pull request.
Attachment #777824 - Flags: review?(etienne)
I've also added some drive-by review comments.
(In reply to Alexandre LISSY :gerard-majax from comment #12) > Finally we go back to a simpler migration. While detecting on the fly that > the number is a Voicemail one could be good, it is not possible to be > performed during the upgradeneeded transaction (Voicemail.check() callback > makes us losing the transaction). You can open a new transaction within the Voicemail.check() handler
This patch contains the DB upgrade code that checks if a group contains voicemail calls or not. It still needs to do the same with the recents store (we probably don't need to block the rendering of the call log for this object store update as we are not actually using it now) and for the emergency call use case.
Oh, and I included your patch for bug 892520, as now it's needed :)
(In reply to Fernando Jiménez Moreno [:ferjm] (PTO from 30/7 to 26/8) from comment #20) > Oh, and I included your patch for bug 892520, as now it's needed :) Once again I predicted a bug :)
Sorry for the delay, I thought that fernando was taking this bug while I was away. I'll work on this one right now.
Alexandre, do you still feel like working on this bug or should we reassign ?
(In reply to Julien Wajsberg [:julienw] (PTO 15th -> 28th July) from comment #23) > Alexandre, do you still feel like working on this bug or should we reassign ? Well it's still blocked by 895517, and since I'm off this week, feel free to reassign. When I replied previously, I secretly hoped that bug 895517 would be fixed soon :(
From discussions in bug 895517 it looks like we don't mind about migrating the existing call log database. At least we don't want to expose a new API for a one-time operation on an ephemeral list. Ferjm, could we move forward here, then ?
I've updated my pull request. As far as I could test, it's updating things correctly.
Attachment #777824 - Flags: review?(mihai)
(In reply to Julien Wajsberg [:julienw] from comment #25) > From discussions in bug 895517 it looks like we don't mind about migrating > the existing call log database. At least we don't want to expose a new API > for a one-time operation on an ephemeral list. > Julien, from my understanding of the discussion there, starting from bug 895517 comment 25, migrating the call log db to find previously made emergency calls is NOT advisable, especially because of the short-lived life of calls in the log.
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 Thanks for the patch Alexandre, while it does work on the phone, I have a few comments on GitHub regarding some refactoring that would optimize performance and maintainability of the code. Feel free to request the review again once those suggestions are addressed.
Attachment #777824 - Flags: review?(mihai) → review-
(In reply to Mihai Cirlanaru [:mihai][:mcirlanaru] from comment #28) > Comment on attachment 777824 [details] > Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 > > Thanks for the patch Alexandre, while it does work on the phone, I have a > few comments on GitHub regarding some refactoring that would optimize > performance and maintainability of the code. > > Feel free to request the review again once those suggestions are addressed. Thanks for the comments, I've addressed most of those. For the two remaining that I did not addressed, I'm not sure of the way to deal with, see comments on github.
Attachment #777824 - Flags: review- → review?(mihai)
(In reply to Mihai Cirlanaru [:mihai][:mcirlanaru] from comment #27) > > Julien, from my understanding of the discussion there, starting from bug > 895517 comment 25, migrating the call log db to find previously made > emergency calls is NOT advisable, especially because of the short-lived life > of calls in the log. Yep, that's what I meant :) sorry for the misunderstanding
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 Thanks Alexandre, we're getting there! I have left you suggestions on GitHub on how to go about the remaining comments -- request the review again once those are in :)
Attachment #777824 - Flags: review?(mihai)
(In reply to Mihai Cirlanaru [:mihai][:mcirlanaru] from comment #31) > Comment on attachment 777824 [details] > Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 > > Thanks Alexandre, we're getting there! I have left you suggestions on GitHub > on how to go about the remaining comments -- request the review again once > those are in :) I've updated the latest part. I can't more the latest if addition in createGroup() because it depends on primInfo.parentNode which is undefined until the |main.appendChild(primInfo);| call
Attachment #777824 - Flags: review?(etienne)
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 Commented on github. I have to r- because the migration code as it is will leave the call log stuck on the "database migration screen" the first time it launches. The details are on github but the fix should be pretty straightforward. Other than that we're good :)
Attachment #777824 - Flags: review?(etienne) → review-
Depends on: 892520
Comment on attachment 777824 [details] Link to Github https://github.com/mozilla-b2g/gaia/pull/10865 I've addressed the comments. Migration is now working well and notifies the user correctly. This also adds tests. Please note I'm still working on making this bug dependant on 892520, which should be straigh forward.
Attachment #777824 - Flags: review- → review?(etienne)
Pull request is updated, now this depends on bug 892520.
No longer depends on: 895517
Attachment #777824 - Flags: review?(etienne) → review+
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Uplifted ae1905a5bf10f064a86731e2bff195c2bccf620f to: v1-train: 0e8e28d549d3f1e8fafe4d7b4be459ce7640d779
v1.1.0hd: 0e8e28d549d3f1e8fafe4d7b4be459ce7640d779
Sorry for jumping on this again so late, but I've been on PTO for a big while. I might be missing something obvious, so forgive me in advance if I am wrong about this comment. But I'm just curious about why did we end up bumping the DB version to 5 only to set two booleans to false for each group of calls? We are not adding/removing new indexes or modifying the value of the data stored with real voicemail/emergency information (other than a default 'false' value for each group of calls) as we are ignoring the already stored information, so we could just leave the db version and the data as it was and just add the new fields in CallLogDBManager.add as needed. Correct me if I am wrong, please, but the condition at [1] would still be evaluated as false if both fields ('voicemail' and 'emergency') are undefined. IMHO CallLogDBManager._upgradeSchemaVersion5 is not needed the way it is. Adding a 'false' value in a DB field is like not having that field in this case. [1] https://github.com/lissyx/gaia/blob/7b0c70b0b9a2e26e9c5ba0cd34e46e02cb4c4d1d/apps/communications/dialer/js/call_log.js#L479
Flags: needinfo?(lissyx+mozillians)
Flags: needinfo?(etienne)
Since this patch already landed, we cannot decrease the DB version, but we can just clear the CallLogDBManager._upgradeSchemaVersion5 function. I'll file a bug to do that if you agree that the upgrade code is not needed.
(In reply to Fernando Jiménez Moreno [:ferjm] (PTO from 30/7 to 26/8) from comment #41) > Since this patch already landed, we cannot decrease the DB version, but we > can just clear the CallLogDBManager._upgradeSchemaVersion5 function. I'll > file a bug to do that if you agree that the upgrade code is not needed. Agreed. You're painfully right, old SQL reflexes...
Flags: needinfo?(etienne)
We discussed this with Alexandre, and we decided to do this even if it was not mandatory, because explicit is better than implicit.
(In reply to Julien Wajsberg [:julienw] from comment #43) > because explicit is better than implicit. Unless is useless and decreases the performance of the upgrade process :)
Flags: needinfo?(lissyx+mozillians)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: