Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update Delete.php to mark group folders as deleted RE:#9028 #10059 #10084

Open
wants to merge 1 commit into
base: hotfix
Choose a base branch
from

Conversation

pstevens71
Copy link

When group email accounts are deleted the associated folders don't get marked as deleted=1 in the folders table. This means they show up for users in folder selection because is shows all folder not equal to deleted=1 (among a few other conditions). They should be marked as deleted when the inbound group email account is deleted. There is in fact, functionality to do this in SugarFolders.php but is is not called when an inbound group email is deleted. This additional code just calls the existing function delete() when an inbound email account is deleted.

Description

This is an addtion to delete.php file simply to get the ID of the folder that is being deleted and then to call and pass it along to SugarFolders.php. There are two functions that then get processed: delete() which also then calls deleteChildrenCascade($id) to delete the child folders.

This is related to the general issue #9028 there are various problems related to group emails. This is one.

#9028 #10059

Motivation and Context

This change is required so that the delete function gets called properly and the folders from the folders table are marked deleted as they should be.

How To Test This

Create a group inbound email account. Ensure you have subscribed the user to folders so they are created.
Delete the inbound group email account, after application of this change, the INBOX (parent folder) and the children folders of the inbound email account should now be updated such that deleted="1" in the folders table.

Types of changes

  • [x ] Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Final checklist

  • [x ] My code follows the code style of this project found here.
  • My change requires a change to the documentation.
  • [x ] I have read the How to Contribute guidelines.

When group email accounts are deleted the associated folders don't get marked as deleted=1.  This means they show up for users in folder selection.  They should be marked as deleted when the inbound group email account is deleted.  There is in fact, functionality to do this in SugarFolders.php but is is not called when an inbound group email is deleted.  This additional code just calls the existing function delete() when an inbound email account is deleted.
@SuiteBot
Copy link

This pull request has been mentioned on SuiteCRM. There might be relevant details there:

https://community.suitecrm.com/t/does-anyone-have-group-emails-working-for-users/88944/24

@pstevens71
Copy link
Author

Note: this change is applicable to both 7.12 and 7.13+ branches.

@jack7anderson7 jack7anderson7 added the Area: Emails Issues & PRs related to all things regarding emails & email module label Aug 30, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Emails Issues & PRs related to all things regarding emails & email module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants