Problem/Motivation
I want to delete Entity Legal version(documents).
Steps to reproduce
Go to Entity Legal, edit and try to remove a version.
Proposed resolution
- Create new routing.
- Add 'delete' url in EntityLegalDocumentForm.
- Create a new permission 'delete entity legal versions'.
User interface changes
Add a delete button in documents.
Issue fork entity_legal-3258368
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #3
saidatomComment #4
dimilias commentedI have two more issues with the implementation. First, we are lacking tests.
Second, the module has 3 entities. EntityLegalDocument, EntityLegalDocumentVersion and EntityLegalDocumentAcceptance.
The acceptance entity holds users that have accepted a specific version. We need somehow to be able to cleanup these acceptances once a version is deleted.
Please, note, that this should not be done with a direct deletion. It would be better to be a batched or cron process because in a large scale website, there might be millions of entities to delete.
Comment #5
saidatom@idimopoulos delete the actual accepted versions was already implemented in old code. If you check delete from EntityLegalDocument they are deleting child's in that case documents and accepted versions. Do we need to implement that new approach to delete the accepted versions in batch/cron?
Comment #6
dimilias commented@saidatom, no the new changes suffice for the scope of the ticket. Users are now able to delete documents. If the accepted versions are also cleaned, that is fine for me. +1 RTBC here.
Comment #7
dimilias commentedPlease, note that the failing tests are irrelevant. There is a separate ticket for this and the new test is working fine.
Comment #9
claudiu.cristeaThank you!
Comment #10
claudiu.cristeaFix credits.