Bug 407148

Summary: Mail actions in message viewer sometimes apply to wrong email
Product: [Applications] kmail2 Reporter: Kishore Gopalakrishnan <kishore96>
Component: commands and actionsAssignee: kdepim bugs <kdepim-bugs>
Status: REPORTED ---    
Severity: normal    
Priority: NOR    
Version: 5.11.0   
Target Milestone: ---   
Platform: Arch Linux   
OS: Linux   
Latest Commit: Version Fixed In:

Description Kishore Gopalakrishnan 2019-05-02 08:16:58 UTC
SUMMARY
If we try to apply an action (I've checked for mark as unread / important) to an email which was opened from a new mail notification, the action is applied to the last mail which was selected in the main kmail window.

STEPS TO REPRODUCE
1. Wait to receive a new email. Click on the 'view mail' button in the notification that appears.
2. In the window that is opened, try to mark the mail as important.
3. Close the window and open the main Kmail window

OBSERVED RESULT
The 'important' tag is applied to the last mail that was selected in the kmail message list, but not the mail which you were viewing.

EXPECTED RESULT
The 'important' or 'unread' actions should be applied only to the message that is currently being viewed.

SOFTWARE/OS VERSIONS
Distribution: Arch Linux
KDE Plasma Version: 5.15.4
KDE Frameworks Version: 5.57.0
Qt Version: 5.12.3
Akonadi version: 0.99

ADDITIONAL INFORMATION
I'm not sure if this is important to reproduce this bug, but I usually have Kmail running in the background and minimized to the system tray. This happens with multiple IMAP Gmail inboxes. I don't have inboxes with any other providers to check.