-
Notifications
You must be signed in to change notification settings - Fork 21
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
Unpublish flow #161
Conversation
22e0b96
to
99aea58
Compare
cf82b7f
to
cdbb511
Compare
@@ -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? |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
0e53db3
to
0a62b59
Compare
I hate isort with a passion. |
0a62b59
to
7ce61de
Compare
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.
Depends on Create signal for when a collection is published #159Currently blocked by Select moderation requests from changelist for publishing #160Related to Add appropriately named action to unpublish #166, an action that should be used for unpublishing.