-
Notifications
You must be signed in to change notification settings - Fork 901
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
Clean Paper Trail Versions #212
Conversation
…onjuctioned with group_by allows a version to be split into separate days.
… sanitizing(removing) extra versions.
@seanmarcia - Sorry for the delayed response on this. Do you think we could refactor this a bit to provide flexibility to allow for variable version limits instead of just 1? I want to try to pull the logic behind this in, however, I feel like it has a very narrow use case as it stands. |
Sounds good. I'll submit a new PR that accepts variable limits. |
@seanmarcia - Please take a look at dbb4f28 and see if this commit (Adding an option to limit the # of versions stored) might suffice for this type of thing or somehow go hand in hand with your idea. Just trying to merge this idea in in a thoughtful manner. |
…hod the option of passing in a value. Also created a keep versions method that keeps the specified number of versions.
…of versions to keep.
Sorry about so slowly following up with this some unexpected travel came up. I updated the cleaning to accept a variable, or if none is passed to default to one. |
Hey @seanmarcia, apologies again on the delayed response on this, it's been a busy summer. I'm working on merging this now, but I'm going to make an attempt to condense the code a bit for readability sake. I'm also trying to add a bit of flexibility in allowing for individual dates to be specified. I think this might be a niche / uncommon use case, but hopefully someone else will find this type of thing useful. |
@seanmarcia - As I mentioned yesterday, I took some time to revise and refactor your Cleaner module. I also gave the method that invokes the cleaning additional configurable options to make it more flexible. It has now been merged and pushed into the master branch. Let me know if you have any comments or questions, but I think the code condensation I performed makes it a little bit more readable, and the optional options argument makes it a lot more flexible. I hope you approve. |
Hey guys the current system of deleting old versions wasn't very useful for our purposes on a CMS. Our university users use versions to maintain and switch between different sites depending on the time of year. For example during the spring, they reverted to the convocation page (and possibly make minor changes), after convocation they put their page up for welcoming new students in the fall and so forth. So just deleting versions older than a certain date isn't practical.
What this PR enables is it cleans up any excess versions and just leave the last one that happened on any given single day. The theory being that when someone makes changes, they will make a lot in the tweaking process but they are only concerned with the last one.
To run the command: