"Clear contact history" doesn't clear contact history but only a few recent entries

REPRODUCIBILITY: 100%
OS VERSION: 4.4.0.72
HARDWARE: 10 III, XA2 Ultra
UI LANGUAGE: Polish, English
REGRESSION:

DESCRIPTION:

The “Clear contact history” option in Phone / History, unlike what its name says, does NOT clear contact’s entire history but only a few recent calls, leaving everything else intact. And as there is no other option anywhere else to clear contact’s entire history (or at least all calls), it is not possible at all.

While in case of a contact with only a few calls in its history this function in most cases clears all of them, in case of contacts with hundreds of calls in their history (e.g. people who we call or get calls from daily or multiple times a day) this function only clears some recent calls from the last few days or a week or so, leaving hundreds of older calls intact.

In /usr/share/voicecall-ui-jolla/pages/CallHistoryView.qml there is a _limit: 200 property which restricts the size of the model used to show the recent calls list in Phone / History. Sadly, it also restricts the number of possible call history entries of a contact which can be cleared by “Clear contact history” menu option. Increasing that _limit property allows to remove more call history of a contact (and a value big enough eventually allows to remove the entire call history of a contact) but it’s only a dirty hack since it also increases the number of items listed in Phone / History tab and may have other side effects.

Anyway, the current name of the menu option “Clear contact history” is totally misleading, since it does NOT clear contact history but only some recent ones (and only calls). So either this option should be fixed to do what it says (i.e. really clear the entire contact history) or its name should be changed to reflect what it really does, i.e. “Clear RECENT calls”.

If the latter, then another option should be provided somewhere else to really clear the entire communication history of a contact, or else it is not possible at all for an ordinary user to do it.

PRECONDITIONS:

Have a contact who you frequently talk with, having long call history (e.g. a few hundred of calls in the past several months)

STEPS TO REPRODUCE:

  1. Have a contact who you frequently talk with, having long call history (e.g. a few hundred of calls in the past several months)
  2. Go to Phone / History tab, tap&hold that contact’s recent call and select “Clear contact history” from the menu
  3. Now go to People app, select that contact to open its card and check its history (select “Show all” to unfold the entire history)
  4. Be amazed that most of call history is still there, only some most recent entries were cleared.

EXPECTED RESULT:

As the name of that option (“Clear contact history”) says, the entire contact history should be cleared.

ACTUAL RESULT:

Only some recent entries are cleared, which in case of contacts with long call history leaves lots of older calls intact.

MODIFICATIONS:

None related.

ADDITIONAL INFORMATION:

As mentioned above, either this “Clear contact history” option should be fixed to do what it says, or a separate option to clear the entire contact history should be provided somewhere else, as currently it is IMPOSSIBLE to clear contact’s entire history (or at least all calls).

5 Likes

Does it help if you set the _limit to a large value just before calling the remove() function?

Something like

} else {
    var displayLimit =commCallModel._limit
    commCallModel._limit = 1000000 // maybe _limit = count suffices
    remove()
    commCallModel._limit = displayLimit
}

If that works it should take care of both issues right?

1 Like

As a workaround, I believe commhistory-tool listgroups | grep <telephone number> to find the group ID, and then commhistory-tool deletegroup <groupid> will clear the complete history.
I have not thoroughly tested this though so it may be dangerous.

voicecall-ui needs to be restarted after doing that.

Also, see libcommhistory/README at master · sailfishos/libcommhistory · GitHub on how to use that tool for testing the contact history.

1 Like

I’ve already removed history of all contacts who had “excessive number” of entries, so I have nothing to test it with at the moment. Currently, with history cleared, even the default 200 limit causes that in Phone / History I see entries ranging back to the day when I bought the phone in July, so changing that value doesn’t have any visible effect, either. So it’ll take a few weeks to have some calls and get some communication history back.

Whether it works will depend on if commCallModel reacts to changing that property after it is already created with its initial value, i.e. if commCallModel size changes “on the fly” as this property value changes…

I’ll test it as soon as I “rebuild” some communication history.

1 Like

Strangely, this seems to work only if given contact’s history includes any SMS/MMS. In such case there is an output with group ID and information about most recent message. If that contact’s history doesn’t contain any SMS/MMS (either sent or received), even if it contains many calls, the output of that command is empty - no group ID or anything else.

And issuing

commhistory-tools listgroups

without any parameters only returns contacts whose history contains any SMS/MMS and is sorted by the date of the most recent message.

So, clearly, this whole groups thing is only related to messaging.

And, sadly, none of the remaining options of commhistory-tool seems to be able to remove history of an individual contact. The listcalls bycontact option only lists calls of a given contact, and when it comes to deleting, besides the deletegroup command (which, apparently, deletes messaging groups) there is only deleteall [-groups|-calls|-reset] (which deletes all calls of all contacts, or all groups, or resets the whole comm database) and delete [eventid] (to delete a single event), i.e. absolutely nothing to delete history of a selected contact…

Thanks for raising this @wetab73. I’ve created an internal ticket for it and tagged it here as “tracked”. I’ll do my best to reply here with any updates.

1 Like