nathanwoulfe/Plumber-2

Document type approval flows unable to be assigned to content type with no properties

lordscarlet opened this issue · 2 comments

Describe the bug
Our list of document types when we add Document type approval flows does not include all document types. Through further investigation, it appears that this is because the document type(s) do not have any of their own property groups.

Our use case is:

  • Parent doc type
    • Child A doc type
    • Child B doc type

Child A and Child B do no have their own properties, but there are controllers/handlers that act upon them differently based on their alias. We are able to choose the parent doc type for approval flow, but that does not catch the children when submitting for approval.

Our workaround at the moment is to manually add Child A and B to WorkflowUserGroupPermissions

To Reproduce
Steps to reproduce the behavior:

  1. Create a document type and add a property group with at least on property
  2. Create a child document type, but add no new groups or properties
  3. Attempt to add a Document-type approval for the child document type (it will not be listed)
  4. Attempt to add a Document-type approval for the parent document type (this should work)
  5. Create two nodes: one of the parent type, one of the child
  6. When submitting each for review, only the parent will be caught for the approval group created in (4)

Expected behavior
I would expect one of two things to happen:

  1. All document types to be listed
  2. Parent document type approval flows to cascade to the children (this seems like it could have unexpected side effects)

Plumber version
2.1.2-rc.909

Licensed version?
Yes

Hi @lordscarlet, this sounds like over-zealous filtering when determining the 'valid' content types - intent was to not show elements, but looks like it's a bit heavy-handed.

I have a patch for 8/9/10 due soon, will look at fixing this at the same time, even if that fix means loosening the filtering to show all content types (which might be a good thing as I can then use the internal picker rather than a custom one).

Hey @lordscarlet this is fixed in v2.1.9 and v10.1.1 - all non-element-type document types should be available for selection.