Repository navigation
Conversation
Documentation build overview
13 files changed ·
|
This was referenced Oct 29, 2026
Member
Author
|
LGTM |
sneridagh
marked this pull request as ready for review
November 1, 2026 02:41
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 1, 2026 02:41
11f11c3 to
028f8d0
Compare
Member
Author
|
@davisagli there are two required checks that are not running? I think it happens in all this stack |
davisagli
force-pushed
the
issue-2061-workflows
branch
2 times, most recently
from
November 1, 2026 20:06
9ebffcf to
27de0c2
Compare
Member
|
@sneridagh It's the normal Jenkins builds. They don't run until you ask mr.roboto to start them. |
davisagli
reviewed
Nov 1, 2026
davisagli
left a comment
Member
There was a problem hiding this comment.
I reviewed the docs, but not the implementation yet.
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 3, 2026 13:16
95c2961 to
652ed78
Compare
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 3, 2026 13:23
652ed78 to
f20360b
Compare
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 3, 2026 14:06
f20360b to
20d5801
Compare
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 5, 2026 11:24
20d5801 to
12798bc
Compare
- GET @workflows: every workflow with its states, and the default one. - GET @workflows/{id}: states with transitions, visibility and permission roles, transitions with their guard, and the types using the workflow. - GET/POST @content-types/{type}/workflow: the type's workflow, and changing it, to a workflow, no workflow or back to the default. - POST @workflows: change the default workflow, remapping the types that follow it, like the classic types control panel. - dry_run counts items by current state, suggests a state that keeps who can see them, and counts items under a placeful policy. Applying uses plone.app.workflow's remap_workflow.
sneridagh
force-pushed
the
issue-2061-workflows
branch
from
November 5, 2026 13:12
12798bc to
5ff93d9
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Step 4 of #2061. Stacked on #2080.
What a workflow UI needs: the available workflows with enough detail to plan a state mapping, and changing the workflow of a type, or the default one, with a preview of what happens to existing items.
GET /@workflowsportal_workflow, sorted by translated title, with@id,id,title,description,initial_stateand the IDs of itsstates, plus the site'sdefault(nullwhen the default chain is empty).GET /@workflows/{id}returns one workflow in full: states withtitle,description,transitions,visibilityandpermission_roles; transitions withtitle,description,new_stateandguard(permissions,roles,expression); and thetypeswhose effective chain has the workflow, including types following the default. Unknown IDs return404.visibilitycomes from the roles withView:anyone(Anonymous),members(Authenticated or Member),restricted(explicit roles only), orunknown(the state doesn't manageView, or acquires it without Anonymous). DCWorkflow stores acquired permissions as a list, the others as a tuple.plonedomain. Transition titles are the action titles ("Publish"), as in@workflow.coloryet: DCWorkflow has nowhere to store it.GET,POST /@content-types/{type}/workflowGETreturns{"@id", "id", "follows_default"}, the same as theworkflowof the type.POSTtakes{"workflow": "…" | null}or{"follows_default": true}, an optionalstate_map, anddry_run. Unknown workflows, unknown target states and a body with neither return400; unknown types404.dry_run, it changes nothing and returns the targetworkflow, thecurrentone, one entry per current state with its itemcountand thesuggestednew state, andunaffected: items under a placeful workflow policy that give them another workflow (0withoutportal_placeful_workflow). A type without a workflow has a single entry with"id": "". Counts are unrestricted catalog queries onportal_typeandreview_state.dry_run, it applies the mapping withplone.app.workflow'sremap_workflow, as the classic types control panel does: it updates security and reindexes. States left out ofstate_mapget the suggested state. It returns{"workflow", "follows_default", "changed"}. When the effective workflow doesn't change (for example the default workflow assigned explicitly), only the assignment changes andchangedis0.POST /@workflowsdefaultinstead ofworkflow), plus thetypesfollowing the default. Like the classic form, it pins the old chain on the types following the default, changes the default, and remaps them back to(Default). Returns{"default", "changed"}.Docs
workflows.mdcontent-types.md: "Change the workflow"workflows_get,workflows_get_item,workflows_post_dry_run,workflows_post,content_types_get_workflow,content_types_post_workflow_dry_runandcontent_types_post_workflowTests
test_services_workflows.py: listing, no default, the full workflow,typeswith explicit chains, visibility (including acquired and unmanagedView), suggestions keeping visibility, default changes (dry run, apply, no default), invalid requests, and permissionstest_services_contenttypes.py,TestContentTypesWorkflow:GET, dry run counts and suggestions (published in simple publication → external in intranet), dry runs to and from no workflow, applying (real items move, security follows), back to the default, same workflow, no workflow,400s,404s, items under a placeful policy, and the new paths in the permission testsFull suite: 1539 tests. 7 fail, and the same 7 fail on #2080's branch: date-dependent tests in
test_workflow,test_searchandtest_statictime.