Bug Fix To Delete Folder On Discard of drafts #112
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a bug where if we upload few attachments and before saving the entity, if we were discarding the draft. Folder in SDM was not getting deleted. This was because of DB query we were executing earlier to check if folder needs to be deleted or not. Fixed the DB query and now the folders are also getting cleaned up
List of scenarios tested on cloud:
Create an entity, Upload multiple attachments, Discard drafts. => Success. Entity & all it's attachments are deleted.
Create an entity, Upload multiple attachments, Go back and create another entity and upload few attachments in new entity, Discard drafts => Entity & all it's attachments are deleted along with cleanup from SDM.
Create an entity, Upload multiple attachments, Create, Edit, Upload New attachments, Discard drafts => Success. Newly added attachments are deleted along with cleanup from SDM.
Upload a valid attachment => Success.
Upload multiple valid attachment => Success.
Upload a duplicate attachment => Duplicate error message on UI.
Upload multiple attachments, Rename few of them & Click on create => Success.
Upload multiple attachments, Rename few of them to same name as existing & Click on create => Duplicate warning
Upload multiple attachments, Click on Create, Click on Edit, Rename few of the attachments to valid names => Success.
Upload multiple attachments, Click on Create, Click on Edit, Rename few of the attachments to duplicate names => Duplicate Warning.
Upload multiple attachments of different extensions, Read them => Success. Behaviour is as expected.
Upload multiple attachments of different extensions, Create, Read them => Success. Behaviour is as expected.
Upload multiple attachments, Click on Create, Click on Edit, Delete few attachments, Click on Create => Success.
Create an entity, Upload multiple attachments, Click on Create, Delete Entity. => Success. Entity & all it's attachments are deleted.