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
Segment deletion validation. #6566
Conversation
Hi @mitresh95 this is an awesome improvement !! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Doesn' work for me. Tested with Mautibox https://mautibox.com/6566/s/segments
If I use delete button, segment deleted, but no flash message.
If I use batch delete, there is flash message (translations missing), but segment is delete either.
Hi @npracht Thank you! And sorry for the delayed response. So if you mean to say that if a contact segment is used in the Campaigns or else, then no, right now this feature just checks for segment inter-dependency. So while deletion it will be only checked with other segments weather or not other segment/s are dependent on it. |
@kuzmany This is strange. Checking out the branch in my local environment and testing it gave me proper results. Let me look it up and see what is wrong here. Thanks! |
@mitresh95 it would be awesome that it is checked in any other type of entity (points, campaigns, email, etc.) |
Agree, Norman, but this is a step in the right direction :). Thx for commenting. |
@kuzmany let us know if this has resolved in mautibox. We are running it and it is working fine. |
@mitresh95 Pls fix the conflicts. |
da2b339
to
876681f
Compare
@mleffler Maybe I am wrong, but I didn't see translation for mautic.lead.list.error.cannot.delete.batch anyway in this PR or in actual staging. I am not sure If the PR is committed complete |
Also as I see the code apply just for batchDeleteAction() Where is the check for deleteAction() ? |
Also there is no return if toBeDeleted is empty Code continue to delete entities and info about success. But there is no success in that case |
This will be taken care of for 2.15.1. Sorry for the delay. |
f2a84c5
to
c222948
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just tested and it works. Great way to improve UX and side effect issues.
Description:
We need to validate if some other entity depends on the segment being deleted. Currently there is no validation which leads to segment processing errors when dependent segments are deleted.
Steps to reproduce the bug:
Steps to test this PR: