Skip to content

Commit

Permalink
Upgrade step added
Browse files Browse the repository at this point in the history
Upgrade applies workflow changes to existing instances
  • Loading branch information
ksuess committed Jan 14, 2020
1 parent 6409366 commit 9b1eb68
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 1 deletion.
2 changes: 1 addition & 1 deletion plone/app/discussion/profiles/default/metadata.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<metadata>
<version>1001</version>
<version>1002</version>
<dependencies>
<dependency>profile-plone.resource:default</dependency>
<dependency>profile-plone.app.registry:default</dependency>
Expand Down
5 changes: 5 additions & 0 deletions plone/app/discussion/upgrades.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,3 +73,8 @@ def upgrade_comment_workflows(context):

def add_js_to_plone_legacy(context):
context.runImportStepFromProfile(default_profile, 'plone.app.registry')


def extend_review_workflow(context):
"""Apply changes made to review workflow."""
upgrade_comment_workflows_retain_current_workflow(context)
11 changes: 11 additions & 0 deletions plone/app/discussion/upgrades.zcml
Original file line number Diff line number Diff line change
Expand Up @@ -62,4 +62,15 @@
/>
</genericsetup:upgradeSteps>

<genericsetup:upgradeSteps
source="1001"
destination="1002"
profile="plone.app.discussion:default">
<genericsetup:upgradeStep
title="Extended review workflow with states pending, published and new: rejected and spam"
description="Additional states allows moderator to review history of publishing and rejection"
handler=".upgrades.extend_review_workflow"
/>
</genericsetup:upgradeSteps>

</configure>

0 comments on commit 9b1eb68

Please sign in to comment.