Suitecrm: 7.10. Disregard Draft email on reply deletes original email

Created on 17 Feb 2020  路  5Comments  路  Source: salesagility/SuiteCRM

When I want to reply on email, but change my mind and disregard new draft, CRM deletes my original email. So I don't have any of that 2 emails.

Issue

Disregard draft action deletes original email instead of new one.

Expected Behavior

New email (draft one) should be deleted, and original kept intact.

Actual Behavior

Deletes both emails.

Possible Fix

Steps to Reproduce

  1. Open one email, and select Reply
  2. While in REPLY click 'Disregard Draft'
  3. When returned to the record where the original email was connected (Account, Contact ...) original mail is gone.

Context

This is a major bug, canceling emails are impossible due to the deletion of the original email.

Your Environment

  • SuiteCRM Version used: 7.10.22., 7.10.16.
  • Browser name and version (e.g. Chrome Version 51.0.2704.63 (64-bit)): Firefox 72.0.1 (64-bit)
  • Environment name and version (e.g. MySQL, PHP 7): PHP 7.3, MySQL 5.7
  • Operating System and version (e.g Ubuntu 16.04): Mint 18.1
Emails Important Bug

All 5 comments

EDIT of my comment
I was misled about database state, so gave it one more test and code review.

It seems that DRAFT is original mail (it has the same ID) and when discarded it is set deleted = 1
(modules/Emails/EmailsController.php, function: action_DeleteDraft() ).

Why draft is not a new bean, I don't know; but that should be only correct way.

Hi @fcorluka,

This issue has been confirmed to exist and is replicable in the latest 7.10.x version.

I guess the system does technically warn for this but it's very vague and you would assume it means the draft.
Screenshot from 2020-02-21 11-11-32

Either way definitely needs work.

Thanks :+1:

Does anyone have some architectural plan for the EMAILS module and all actions (functions) so that I could try to fix this, or should I wait for dev team?

BR,
Filip

This is a major oversight and corruption of emails.

There is another problem problem related to this...

  • If you Save Draft on a replied email it overwrites the original email
  • Also if you then send that reply it uses the date_entered from the original message that was replied to
  • Also the date_sent is not set
  • Also uid is copied from original bean

https://github.com/salesagility/SuiteCRM/pull/8715

Ive created this to fix some of these issues, it will not allow you to discard a message that is not in draft status, it will also create a new message if you press Save Draft

Was this page helpful?
0 / 5 - 0 ratings