We have moved to GitHub Issues
Created by Stephan 06 Dec 2016, 17:02:38 Updated by Shannon Deminick 29 May 2017, 18:15:55
Is required for: deploy-120
Subtask of: deploy-118
Macros in 7.5 do not have a Guid, this needs to change + service should GetById(guid) etc.
PR (against 7.6): https://github.com/umbraco/Umbraco-CMS/pull/1657
Review: upgrade to 7.6 or install, check that tables cmsMacro and cmsMacroProperty both have a new uniqueId column. Create a macro, with parameters: they should have GUIDs in these columns. Editing the macro, changing the alias, etc should preserve the GUIDs (they should not change).
Almost there, but a alter-table migration is not running properly ;-(
fixed, ready for review
or maybe not, fixing...
should be good this time - further testing: should be possible to edit and save a macro, add and remove parameters, change aliases, and even swap the alias of two parameters.
All seems to work, have added some comments on GitHub and pushed another rev to have the macro service test the GUID/Keys. Might be worth adding tests for the new methods added:
IMacro Get(Guid id),
IEnumerable<IMacro> GetAll(params Guid ids),
bool Exists(Guid id)
I've also added a commit to test which version of Umbraco is running based on the db schema, I've tested running 7.6, then removing these new columns and clearing out the version in the web.config which forces the installer to run again and with this new change it detects 7.5 and re-adds the colums. I've also tested clearing out the version in the web.config and re-running the installer with the columsn already there and there are no errors.
I'll put this into re-work for you to review my changes and make any of these suggested updates
Your changes look ok + have cleaned up according to suggestions and added tests.
Type: Feature (request)
Backwards Compatible: True
Due in version: 7.6.0
Sprint: Sprint 49
Story Points: 2.5