Create a History of the changes inside a Template Layout/ Use this Hi…
The problem here is that when you send a TemplateLayout after changed it to a receiver we don't have a way to know witch was the movement on the receiver because the UUID are already all recalculated, and the multi_tree are not sent unless you sent the page too.
The fix was create a new history on the layout to know how the UUID of each Container have been move, also I created a new version attribute to count how many time the Layout have changed.
Proposed Changes
- Change in the Handler to use the method to update the Layout when the Template already exists on the receiver
https://github.com/dotCMS/core/pull/29752/files#diff-1e5a19fcdfdbe883752308cb7adf42231e860dff8300edf8b20c66f8b2b0fd39R168-R185
This method also recalculated the UUID.
- Create a new History field
https://github.com/dotCMS/core/pull/29752/files#diff-8a7533dd3f0219197b317cfcfc4848a3e61492c38f1bac1d5aeaec566025c626R50
- keep the history when update a TemplateLayout
https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1433
- Create a new version field
https://github.com/dotCMS/core/pull/29752/files#diff-edc3e1981140c3dc84b3fbab35e5afb0ffc0e9f3f8b47673ed42da6939bf83fbR58
- recalculated the version when the TemplateLayout is saved
https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1306
- Calculate the changes using the new History attribute on the receiver
https://github.com/dotCMS/core/pull/29752/files#diff-ce9702cf145c3dc3fd6472a323188b4897be3c98058272d8eba3f54d836f46ceR1319
https://github.com/dotCMS/core/pull/29752/files#diff-acae9e18f11a2e8737fad0e31d65f09f2e330c049e6320996de89ed5ef495ef4R26
Checklist
- [ ] Tests
- [ ] Translations
- [ ] Security Implications Contemplated (add notes if applicable)
Additional Info
** any additional useful context or info **
Screenshots
| Original | Updated |
|---|---|
| ** original screenshot ** | ** updated screenshot ** |
Quality Gate passed
Issues
0 New issues
2 Fixed issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code