Add a way to set categories on workflow
Currently you can recovery categories from the api, but you can not set the categories to the contentlet in order to be saved.
Acceptance criteria:
After the change a documented approach should exists to set the categories into the contentlet on workflow as a velocity script
Customer ticket: https://dotcms.zendesk.com/agent/tickets/108490
In order to make it works you have to:
-
create a content type with categories

-
create a workflow action (velocity script actionlet)

#set($parentCategory = $categories.getCategoryByKey('ageOrGender'))
#set($cats= $categories.getChildrenCategories($categories.getCategoryByKey('ageOrGender')))
#set($contentDeps = $workflow.copyContentletDependenciesBuilder().categories($cats).build())
$workflow.setContentletDependencies($contentDeps))
Create a new type and fire the new action, the categories of age or gender will be assigned to the contentlet
This seems that is already merged in 22.12 but it wasn't QA, so marking as a Priority just to do QA