aggregated texts scope disappears from today scope

Bug #1634092 reported by N. Gineer
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Texts Scope
Fix Committed
Medium
Penk Chen
Today Scope
Invalid
Undecided
Unassigned
Ubuntu Translations
New
Undecided
Unassigned

Bug Description

What happens:

In the Today Scope, the entry for recent text messages is missing completely, when I only sent messages today, but did not receive any. (In the settings view, showing results from the Texts Scope is selected.)

What I expect to happen:

The last message sent is displayed in the "Recent" section of the Today Scope. Or, the text "no messages received today" is displayed instead, because sent messages are not shown in the "Recent" section.

$ click list | grep dashboard
com.canonical.scopes.dashboard 4.11.1

BQ Aquaris E4.5 Ubuntu Edition
Ubuntu 15.04 (OTA-13)

Tags: ota14

Related branches

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hi N.

Only showing *received* texts in Today scope is the design.

You can see the line of code where this is applied right here:
http://bazaar.launchpad.net/~texts-scope-team/texts-scope/texts-scope-trunk/view/head:/src/query.cpp#L426

line 409 checks if the scope is aggregated by the particular keyword. Then, we loop through today's received text message events.

Cheers

Changed in today-scope:
status: New → Invalid
Revision history for this message
N. Gineer (n-gineer) wrote :

I think that the Texts Scope should return "No Messages Today" to the Today Scope, when messages were sent but none received, instead of disappearing.

That's why I reopen the bug for Texts Scope.

@Kyle: Thanks for the info, especially for the link to the relevant lines in src.

As far as I see, if messages were sent but none received, the following happens in query.cpp:
414: "No Messages Today" is not returned, because (tevents1.size() == 0) is false
424: The if branch in the for loop is never executed, because (ev.type == TextType_t::received) is always false
=> reply->push(res) is not executed
=> The Texts Scope is not shown anymore

Thanks for your effort!

summary: - Text messages entry disappears from "Recent" when there are only
- outgoing messages
+ Aggregate function returns nothing when there are only outgoing messages
N. Gineer (n-gineer)
summary: - Aggregate function returns nothing when there are only outgoing messages
+ query.cpp returns null when aggregated and there are only outgoing
+ messages
summary: - query.cpp returns null when aggregated and there are only outgoing
- messages
+ texts scope only shows received msgs when aggregated
Changed in texts-scope:
importance: Undecided → Wishlist
Revision history for this message
N. Gineer (n-gineer) wrote :

Hi Kyle,

I think I have to clarify what I mean.

I don't need to see received messages.

I wanted to point out that the code has a bug:
The aggregated Texts Scope disappears from the Today Scope under certain circumstances. I am sure that the disappearance is not intended by the developers. (E.g. in this case you cannot open the not-aggregated Texts Scope from the Today Scope anymore, though the aggregation of the Texts Scope is selected in the Today Scope settings.)

Currently the code works as follows:

Case A: You did neither send nor receive any messages today -> "No Messages Today" in Today Scope.

Case B: You did receive, but did not send any messages -> Newest received message in Today Scope.

Case C: You did send and receive messages -> Newest received message in Today Scope.

Case D: You did send, but did not receive an messages -> The aggregated Texts Scope disappears from the Today Scope, instead of displaying "No Messages Today".

The reason is, in case D, in "query.cpp", "run()" never sets the CategorisedResult "res" and never executes the line "reply->push(res)".

The solution could be as simple as to move the "if" block 414-423 after the "for" loop (after line 452) and to omit the if condition. (If any received messages are found, the function exits from inside the "for" loop, and the "No Messages Today" part is not executed.)

summary: - texts scope only shows received msgs when aggregated
+ aggregated texts scope disappears from today scope
Revision history for this message
N. Gineer (n-gineer) wrote :

Correction - I wanted to say: "I don't need to see _sent_ messages."

Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hi N,

I see your point :) I am at a convention this week but will take a look at this next week.

Cheers!
Kyle

Changed in texts-scope:
importance: Wishlist → Medium
assignee: nobody → Kyle Nitzsche (knitzsche)
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

N.

Your code suggestion to address this is spot on. I will merge to trunk and start the process to release update (version 1.9)

One additional bit that needs to change is the result title "No Messages Today" is changed to "No Received Messages Today". This is needed because the icon does not show the user whether it is for received or sent, but the corresponding icon in for calls does show that the case is received.

Cheers,
Kyle

Changed in texts-scope:
status: New → Confirmed
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hello Ubuntu Translators!

As you can see (comment #6), a string has changed and translations are greatly appreciated!

Cheers,
Kyle

Changed in texts-scope:
status: Confirmed → Fix Committed
Revision history for this message
Kyle Nitzsche (knitzsche) wrote :

Hi Penk, for ota14. Note: we will need to repull and rebuild to get translations.

tags: added: ota14
Changed in texts-scope:
assignee: Kyle Nitzsche (knitzsche) → Penk Chen (penk)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.