Closed Bug 293832 Opened 19 years ago Closed 19 years ago

label lost when moving message from IMAP to local folder

Categories

(Thunderbird :: Mail Window Front End, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: bugzilla, Assigned: jeongkyu.kim)

References

Details

Attachments

(1 file)

found using 20050509-trunk tbird build on Mac OS X 10.3.9. spun off from bug
127141 comment 24.

0. make sure you have and IMAP account. also create a subfolder under Local Folders.

1. label a message in your IMAP, eg, select a message and then select Message >
Label > Work. this example labels the message orange in the thread pane by default.

2. drag that message into a subfolder under Local Folders.

3. click on the subfolder in Local Folders and look at the thread pane.

expected: the label should still be orange.

actual results: the label is no longer there.
I have this on Win2k & WinXP. Please change Hardware/OS to All/All.
OS: MacOS X → All
Hardware: Macintosh → All
If message is copied from local folder, new header is copied from existing one
using mDatabase->CopyHdrFromExistingHdr(). This guarantee that every attribute
stays after copying.

However, if message is copied _from server_ then new header is generated from
parsed message. And missing attributes are taken care by
CopyPropertiesToMsgHdr() - see code below. Currently, the function takes care of
junk status only. Because of this, label information is missing unless IMAP
server save the information and expose it through message source. I crated a
patch to take care of label also.

In nsMsgLocalMailFolder::EndCopy(),
... 
if (msgDb)
{
  nsresult result =
mCopyState->m_parseMsgState->GetNewMsgHdr(getter_AddRefs(newHdr));
  if (NS_SUCCEEDED(result) && newHdr)
  {
    // need to copy junk score and label from mCopyState->m_message to newHdr.
    if (mCopyState->m_message)
      CopyPropertiesToMsgHdr(newHdr, mCopyState->m_message);
    msgDb->AddNewHdrToDB(newHdr, PR_TRUE);
...
see comment #2
seeking r?
Attachment #183459 - Flags: review?
Attachment #183459 - Flags: review? → review?(mscott)
Comment on attachment 183459 [details] [diff] [review]
patch to copy label when message is copied from server

this looks ok to me code wise. David will know if it is the right thing to do
for sure.
Attachment #183459 - Flags: superreview?(bienvenu)
Attachment #183459 - Flags: review?(mscott)
Attachment #183459 - Flags: review+
mscott, thanks for your review.
Comment on attachment 183459 [details] [diff] [review]
patch to copy label when message is copied from server

good job, thx. I'll try to shepard this in.
Attachment #183459 - Flags: superreview?(bienvenu)
Attachment #183459 - Flags: superreview+
Attachment #183459 - Flags: approval-aviary1.1a2?
david, thanks for your effort.
Comment on attachment 183459 [details] [diff] [review]
patch to copy label when message is copied from server

a=chofmann
Attachment #183459 - Flags: approval-aviary1.1a2? → approval-aviary1.1a2+
re-assigning before marking fixed.
Assignee: mscott → jeongkyu.kim
thx very much,  Jeongkyu - fix checked into trunk.
Status: NEW → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
*** Bug 303973 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: