Closed Bug 955491 Opened 11 years ago Closed 11 years ago

Today/yesterday entries in log viewer don't work for text logs

Categories

(Instantbird Graveyard :: Other, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: aleth)

Details

Attachments

(2 files)

*** Original post on bio 2054 by Connor Behan <connor.behan AT gmail.com> at 2013-07-16 03:18:00 UTC ***

*** Due to BzAPI limitations, the initial description is in comment 1 ***
Attached patch FixSplinter Review
*** Original post on bio 2054 as attmnt 2603 by connor.behan AT gmail.com at 2013-07-16 03:18:00 UTC ***

If two or more conversations took place with the same buddy on the same day, one can usually view all of them in "Show Logs". However, if those conversations happened less than two days ago, the "Today" and "Yesterday" items will only show the most recent conversation. The others will be unviewable until the user waits for a couple days.

This is dumb. The patch will go with the existing behaviour when there is only one conversation. But when there are many, it will treat "Today" and "Yesterday" as groups that show all conversations like the other days.
Comment on attachment 8354372 [details] [diff] [review]
Fix

*** Original change on bio 2054 attmnt 2603 at 2013-07-16 07:50:18 UTC ***

This looks vaguely related to bug 955410 (bio 1973), aleth, could you have a look please? :-)
Attachment #8354372 - Flags: review?(aleth)
*** Original post on bio 2054 at 2013-07-16 09:52:34 UTC ***

Connor, thanks for taking a look at this. Could you tell me whether you are using Instantbird 1.4 or the latest 1.5 nightly build?
*** Original post on bio 2054 by Connor Behan <connor.behan AT gmail.com> at 2013-07-16 19:02:42 UTC ***

Mostly 1.4 but I tried a nightly build and saw the same issue.
*** Original post on bio 2054 at 2013-07-18 17:48:50 UTC ***

I am trying to reproduce this. 
Do you often have conversations that are kept open for multiple days at a time?
Do the times shown in the logs match your system time?
Does this happen for all protocols/accounts or only for certain ones?
*** Original post on bio 2054 by Connor Behan <connor.behan AT gmail.com> at 2013-07-19 02:59:08 UTC ***

All I do is open a conversation and say "foo". Then I close the window and open it again and say "bar". If I go to that buddy and click "View Logs", the item "Today" will show "bar" but not "foo".

The timestamps are fine and it happens with all protocols. I am using plaintext logs by the way.
*** Original post on bio 2054 at 2013-07-19 08:32:39 UTC ***

(In reply to comment #5)

> I am using plaintext logs by the way.

This is the most important info of the whole bug report. I don't think anybody has tried to use plain text logs recently. Honnestly, I'm not completely sure why they are even still supported. It sounds to me like alternative log formats would be better handled by add-ons.
Attached patch PatchSplinter Review
*** Original post on bio 2054 as attmnt 2611 at 2013-07-19 17:01:00 UTC ***

I had no idea anyone was still creating new text logs! That's why I was puzzled about the circumstances in which the need for the existing patch would arise.

As the 'Today' and 'Yesterday' entries are not groups, when text logs are used, all but the first log found is lost, as reported above. 

It's easy to support text logs in 'Today' and 'Yesterday' as well by adding groups when needed (see patch), so I guess we can do this.
Attachment #8354380 - Flags: review?(florian)
Summary: Special treatment for today / yesterday should not hide logs → Today/yesterday entries in log viewer don't work for text logs
Comment on attachment 8354372 [details] [diff] [review]
Fix

*** Original change on bio 2054 attmnt 2603 at 2013-07-19 17:26:05 UTC ***

Thanks for providing this, which was useful in understanding the problem, but I believe there is a cleaner fix.
Attachment #8354372 - Flags: review?(aleth) → review-
*** Original post on bio 2054 by Connor Behan <connor.behan AT gmail.com> at 2013-07-19 19:20:02 UTC ***

Sorry for not mentioning plaintext earlier. But I must say I hope you don't drop support for it. The log viewer works for most things but there is the odd time when I have to grep for a particular string in ~/.instantbird/profile/logs because I remember saying something useful but not the exact date or even the exact buddy.
*** Original post on bio 2054 at 2013-07-19 21:22:21 UTC ***

(In reply to comment #9)

> I hope you don't drop support for it.

We will eventually, but apparently there's no need to do it now.

> The log viewer works for most things but there is the odd
> time when I have to grep for a particular string in ~/.instantbird/profile/logs
> because I remember saying something useful but not the exact date or even the
> exact buddy.

Looks like what you _really_ want is bug 955014 (bio 1584).

Btw, the .json log format we use was designed to be human readable (I wouldn't say human friendly though), so it's still possible to grep these files (I do it a few times a month... because we haven't addressed bug 955014 (bio 1584) yet!).
Comment on attachment 8354380 [details] [diff] [review]
Patch

*** Original change on bio 2054 attmnt 2611 at 2013-07-19 21:59:08 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8354380 - Flags: review?(florian) → review+
*** Original post on bio 2054 at 2013-07-19 22:07:21 UTC ***

http://hg.instantbird.org/instantbird/rev/422af6e964ea
Assignee: nobody → aleth
Status: UNCONFIRMED → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.5
*** Original post on bio 2054 by Connor Behan <connor.behan AT gmail.com> at 2013-07-20 01:07:56 UTC ***

(In reply to comment #10)
> Looks like what you _really_ want is bug 955014 (bio 1584).

That would certainly help :). Another reason could be that someone uses Instantbird and Pidgin. If the logs are similar, it is easy to consolidate them with a script or symlinks.
*** Original post on bio 2054 at 2013-07-20 05:13:15 UTC ***

(In reply to comment #12)

> consolidate them with a script or symlinks.

You may also want bug 954928 (bio 1495) :-).
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: