Skip to content
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

Reverting a ChangeSet #90

Open
kinglozzer opened this issue Jan 23, 2018 · 1 comment
Open

Reverting a ChangeSet #90

kinglozzer opened this issue Jan 23, 2018 · 1 comment

Comments

@kinglozzer
Copy link
Member

Are there any plans to implement this feature (issues like silverstripe/silverstripe-campaign-admin#43 suggest there might be, even if not immediate)? I’m stuck half-way down the rabbit hole at the moment, and I don’t want to duplicate efforts!

I’ve done a minimal amount of work to get ChangeSetItem::revert() functional, but it’s nowhere near PR ready at the moment: kinglozzer@6a762b1. So far, I’ve been working towards what’s documented in the original RFC, but I suspect that a few practicalities may change things there (e.g. is the ability to “revert a revert” feasible?). Things I’m currently stuck on/intimidated by:

  • Publishing a ChangeSet invokes RecursivePublishable::unlinkDisownedObjects(). Does this need to (somehow) be undone during a revert? Is it even possible to revert that?
  • ChangeSet::isSynced() returns false when attempting to revert a ChangeSet that includes an item that was added implicitly. My guess is that this is because ChangeSetItem::findReferenced() doesn’t take into account the current state of the ChangeSet (open vs published), but I’ve not actually looked into this yet

I’m happy to open a PR if that’d be a more appropriate place to discuss this, I just didn’t want to open a *** DO NOT MERGE *** one 😉

@chillu
Copy link
Member

chillu commented Jan 31, 2018

FYI I've created a similar issue for rolling back a particular owner incl. all of its owned relationships. That can be different from a changeset, since a changeset can contain multiple owners: #94

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants