e-mail to event/task conversion: description is taken from wrong e-mail message (depending on Message Pane content)

RESOLVED FIXED in 1.0b1

Status

Calendar
Lightning Only
RESOLVED FIXED
11 years ago
7 years ago

People

(Reporter: Robert Brand, Assigned: martinschroeder)

Tracking

unspecified
1.0b1
Bug Flags:
wanted-calendar1.0 +

Details

Attachments

(1 attachment)

(Reporter)

Description

11 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.1; de; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11
Build Identifier: 

Seen in Thunderbird 2.0.0.9 with Lightning 0.8pre Build 2007-12-27-04-mozilla1.8 on Win XP.

When creating a new task or event by dropping an E-Mail on the Mode Toolbar, taking the text as a description only works if you use the Message Pane in Thunderbird. I don't use it, so the proposed description always is Thunderbird's start page; in general it is the last site/message that was loaded in the Message Pane during a session.
Open the message in its own window is not sufficant.

I saw this with different IMAP-accounts. The offline-settings don't make a difference.

Reproducible: Always

Steps to Reproduce:
1. Create a fresh profile with IMAP-account, install Lightning.
2. Disable Message Pane by pressing F8, restart Thunderbird.
3. Create new task/event by dropping an E-Mail on the Mode Toolbar. 
Actual Results:  
Proposed description is Thunderbird's start page.

Expected Results:  
Proposed description should be the Mail Body.

Comment 1

10 years ago
I cannot reproduce it using Lt 2008012609
(Reporter)

Comment 2

10 years ago
I still see the issue using Lightning 0.8pre 2008012618.
I tested again in a fresh profile, with two different IMAP-Accounts (arcor.de, web.de). I didn't change Thunderbird's default settings, so it just pulls the headers of the E-Mails.
See [1] for a screenshot (text of Thunderbird's start page as the proposed description).

Additional info:
Thunderbird starts in Mail Mode. If I switch to Calendar or Task Mode, switch back to Mail Mode and then try to reproduce the described behaviour, the description field of the new task/event is blank.

[1] http://www.nadelundhirn.de/krams/410050b.png

Comment 3

10 years ago
Lightning 2008012320: confirmed the described behaviour in comment 0. 
Status: UNCONFIRMED → NEW
Ever confirmed: true
Flags: wanted-calendar0.8?

Comment 4

10 years ago
I don't think this is related to IMAP because I can reproduce it and I only use POP3.  I also didn't need to create a new profile or restart Thunderbird.

Thunderbird 2.0.0.9 / Lightning 2008-01-21 19 / WinXP
I can confirm the bug:

Dropping Mails vom POP3 or IMAP-Accounts will take the description from Thunderbird's start page. I try to repeat this a few times, but I could not always reproduce the exactly behavior. After some tries the description field becomes blank.

Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071031 Lightning/0.8pre (2008012818) Thunderbird/2.0.0.9 ID:2007103104

Updated

10 years ago
Flags: wanted-calendar0.8? → wanted-calendar0.8+

Comment 6

10 years ago
Not going to happen for 0.8.
Flags: wanted-calendar0.8+ → wanted-calendar0.8-

Comment 7

10 years ago
I have reproduced this bug.  I can also add that the description that appears is always the message body from the last message loaded into the message pane:

1.  Highlight message 1 so that message 1 body appears in the message pane.
2.  Turn the message pane off.
3.  Drag message 1 to task area and drop - new task appears with message 1 body as description.
4.  Highlight message 2
5.  Drag message 2 to task area and drop - new task appears with message 2 subject as title but with message 1 body as description.

Thunderbird 2.0.0.12 (20080213)/Lightning 0.8 (Build 20080331118)/Linux Ubuntu 7.10
(Assignee)

Updated

10 years ago
OS: Windows XP → All
Hardware: PC → All

Comment 8

10 years ago
It still happens on
Thunderbird Version 2.0.0.12 (20080213) and lightning 0.8 (Build 2008033120) on Windows XP SP2.
It is reproduceable every time.
Flags: wanted-calendar0.9+

Updated

10 years ago
Flags: wanted-calendar0.9+ → wanted-calendar0.9?

Updated

10 years ago
Flags: wanted-calendar0.9?
Flags: wanted-calendar0.9+
Flags: wanted-calendar0.8-

Updated

10 years ago
Flags: wanted-calendar0.9+ → wanted-calendar1.0+

Comment 9

10 years ago
I would like to confirm this is still an issue with Thunderbird 2.0.0.18 and Lightning 0.9rc2 (Build 2008091718).

Comment 10

10 years ago
It is not working at all on Mozilla Firefox 3.0.4 in connection with Lightning 0.7
on Ubuntu 8.04. you cannot drop a message at all.  Very disappointing.
Summary: eMail to event/task conversion: wrong description when not using Message Pane → e-mail to event/task conversion: wrong description when not using Message Pane
Duplicate of this bug: 475489
Summary: e-mail to event/task conversion: wrong description when not using Message Pane → e-mail to event/task conversion: description is taken from wrong e-mail message (depending on Message Pane content)

Comment 12

9 years ago
This was obviously known at the time of coding: 

http://mxr.mozilla.org/comm-central/source/calendar/base/content/calendar-dnd-listener.js#47

It looks like the function that is needed is implemented in gloda as function MsgHdrToMimeMessage here:

http://mxr.mozilla.org/comm-central/source/mailnews/db/gloda/modules/mimemsg.js#171

Is there an easy way to reuse that function from gloda?
(Assignee)

Updated

9 years ago
Assignee: nobody → mschroeder
Status: NEW → ASSIGNED
(Assignee)

Comment 13

9 years ago
Created attachment 382026 [details] [diff] [review]
Patch v1

First try using a synchronous stream listener because we need the information for opening the new event/task dialog. I do not know if I really need a new instance of nsIMessenger or if I can reuse Thunderbird's global one. It is also unclear what are proper values for aBytesToRead (for whole message) and aMaxOutputLen (for truncation of the plain text) in our use case.
Attachment #382026 - Flags: review?(philipp)
Comment on attachment 382026 [details] [diff] [review]
Patch v1


>+        plainTextMessage = msgFolder.getMsgTextFromStream(streamListener.inputStream,
>+                                                          "",
>+                                                          65536, //XXX aBytesToRead
>+                                                          32768, //XXX aMaxOutputLen
>+                                                          false,
>+                                                          true,
>+                                                          {});
The second parameter should be aMsgHdr.Charset.

Looking at the other calls to getMsgTextFromStream and also the source, it seems there is no other possibility than to pass arbitrary numbers. Maybe using hex numbers looks a bit nicer here though.

Nice work!

r=philipp
Attachment #382026 - Flags: review?(philipp) → review+
(Assignee)

Comment 15

9 years ago
(In reply to comment #14)
> The second parameter should be aMsgHdr.Charset.
Done!

Pushed to comm-central <http://hg.mozilla.org/comm-central/rev/7b5924204dfb>

-> FIXED
Status: ASSIGNED → RESOLVED
Last Resolved: 9 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.0
+ plainTextMessage = msgFolder.getMsgTextFromStream(streamListener.inputStream,
+                                                   aMsgHdr.Charset,
+                                                   65536,
+                                                   32768,
+                                                   false,
+                                                   true,
+                                                   {});

You could improve readability and maintainability by something like:

+ const aBytesToRead = 0x10000;
+ const aMaxOutputLen = 0x8000;
+ const aCompressQuotes = false;
+ const aStripHTMLTags = true;
+ plainTextMessage = msgFolder.getMsgTextFromStream(streamListener.inputStream,
+                                                   aMsgHdr.Charset,
+                                                   aBytesToRead,
+                                                   aMaxOutputLen,
+                                                   aCompressQuotes,
+                                                   aStripHTMLTags,
+                                                   {});
Blocks: 453122
These bugs are likely targeted at Lightning 1.0b1, not Lightning 1.0. If this change was done in error, please adjust the target milestone to its correct value. To filter on this bugspam, you can use "lightning-10-target-move".
Target Milestone: 1.0 → 1.0b1
You need to log in before you can comment on or make changes to this bug.