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

Item that has been added implicitly to ChangeSet, cannot be removed #422

Closed
sabina-talipova opened this issue Oct 24, 2023 · 2 comments
Closed

Comments

@sabina-talipova
Copy link
Contributor

sabina-talipova commented Oct 24, 2023

Description

Item that has been added implicitly to the ChangeSet as ChangeSetItem, cannot be remove if explicitly added parent item was removed and ChangeSet has State = 'published'.

Steps to reproduce

  • Create page
  • Add an Image to the Page
  • Save, but don't publish
  • Add the Page to Campaign
  • Go to the Campaign Admin
  • Open Created Campaign
  • You should see your Page in PAGES section and Image in FILES section
  • Click on the Page in PAGES section
  • Click Remove in "Action Menu"
  • Page and appended to the page image were removed form PAGES and FILES sections
  • Repeat previous steps before "Click Remove in "Action Menu""
  • Instead Click Publish Campaign button
  • Click on the Page in PAGES section
  • Click Remove in "Action Menu"
  • Page was removed form PAGES and Image still exist in FILES sections
  • Click on the Image in FILES section
  • Click "Action Menu"
  • You should see "Required by {number} item(s), and cannot be removed directly."

Related issue

PRs

@maxime-rainville
Copy link
Contributor

I've reviewed #423.

I'm wondering if the correct behaviour shouldn't be to "freeze" a campaign once it has been published. It sounds kind of nonsensical to be able to remove items from Campaign Admin post publication. If the we decide the correct behaviour here is to block people from removing item from published campaign, than the behat PR will need to be updated.

@maxime-rainville
Copy link
Contributor

As discussed, we don't think there's a valid usecase for removing item form campaign post publication.

So the second Behat PR is not needed.

I've created this follow up card: silverstripe/silverstripe-campaign-admin#287

@GuySartorelli GuySartorelli changed the title Item that has been added implicitly to ChangeSet, cannot be remove. Item that has been added implicitly to ChangeSet, cannot be removed Nov 8, 2023
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

2 participants