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

Unpublish flow #161

Closed
Closed

Conversation

jonathan-s
Copy link
Contributor

@jonathan-s jonathan-s commented Oct 11, 2019

With this PR you can create a workflow that is designed to unpublish assets / content. The workflow has a new boolean property is_unpublishing that can be selected when you create a workflow.

Once content has been added to be moderated with an unpublishing workflow all content will be unpublished once that has been approved and a signal with all unpublished content will be sent that can be further processed as needed.

@jonathan-s jonathan-s changed the title Unpublish flow WIP: Unpublish flow Oct 11, 2019
@jonathan-s jonathan-s force-pushed the unpublish-flow branch 5 times, most recently from cf82b7f to cdbb511 Compare October 14, 2019 14:41
@@ -647,6 +725,7 @@ def test_signal_when_published(self):
self.assertEquals(published_mr[0], self.moderation_request1)
self.assertEquals(kwargs['workflow'], self.collection.workflow)

# TODO Andrew, how is it intended that collection status should change?
Copy link
Contributor Author

@jonathan-s jonathan-s Oct 14, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ie, right now once all moderation requests are approved the collection status is changed to archived. When reading the tests, it looks like this should NOT be the case.

Either way, I would suggest that changing how collection.status works is out of scope for this PR and it should be changed in new a PR.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is part of the Versioning state machine where versions state change are forced to go through state changes.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The versioning state machine and the collection state machine (albeit simpler than versioning) are pretty much separate.

The behaviour of the collection state machine is basically the following.

COLLECTING = "COLLECTING"
IN_REVIEW = "IN_REVIEW"
ARCHIVED = "ARCHIVED"
CANCELLED = "CANCELLED"

Where there seems to a be bug is that as soon as all requests has been approved the collection state changes from in review to archived. An archived state suggests that no more actions needs to be taken. Even though the collection is now archived there are still actions to be taken.

I'll see if I manage to make a separate PR around that. It's out of scope of this PR anyway.

@jonathan-s
Copy link
Contributor Author

I hate isort with a passion.

@jonathan-s jonathan-s changed the title WIP: Unpublish flow Unpublish flow Oct 23, 2019
@jonathan-s jonathan-s closed this Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants