Skip to content

Creator criterium does not offer to use manually added entries of the creator field #167

@jackahl

Description

@jackahl

Describe the bug

When trying to use a Listing block in Volto, you can only filter for users that actually exist as such. But in the creator field you can actually also add arbitrary strings. Those terms added to the Creator field via the freetext field are not displayed as options for the listing. Those manually created "Creators" should be usable in the criterium as well

To Reproduce

Steps to reproduce the behavior:

  1. go to demo.plone.org
  2. As editor/admin Create a new page3. Add "Lorem" to the creator field and save
  3. Create another page and add a listing block
  4. configure the listing block to have the "Creator" criterium
  5. You can only choose fro existing users for that field not the "lorem" Creator added to the first page

Screenshots

"lorem" Creator added:

Image

Trying to use that as filter criterium:

Image

Software (please complete the following information):

  • Plone Version: 6.1.2
  • Volto Version: 18.23.0
  • Plone REST API Version: 9.15.1

Technical info:

The response from @querystring looks like this for the example given:

{
	"Creator": {
		"description": "The person that created an item",
		"enabled": true,
		"fetch_vocabulary": true,
		"group": "Metadata",
		"operations": [
			"plone.app.querystring.operation.string.currentUser",
			"plone.app.querystring.operation.selection.any",
			"plone.app.querystring.operation.selection.none"
		],
		"operators": {
			"plone.app.querystring.operation.selection.any": {
				"description": "Tip: you can use * to autocomplete.",
				"operation": "plone.app.querystring.queryparser._contains",
				"title": "Matches any of",
				"widget": "MultipleSelectionWidget"
			},
			"plone.app.querystring.operation.selection.none": {
				"description": "Tip: you can use * to autocomplete.",
				"operation": "plone.app.querystring.queryparser._excludes",
				"title": "Matches none of",
				"widget": "MultipleSelectionWidget"
			},
			"plone.app.querystring.operation.string.currentUser": {
				"description": "The user viewing the querystring results",
				"operation": "plone.app.querystring.queryparser._currentUser",
				"title": "Current logged in user",
				"widget": null
			}
		},
		"sortable": true,
		"title": "Creator",
		"values": {
			"my-user": {
				"title": "My User"
			}
		},
		"vocabulary": "plone.app.vocabularies.Users"
	}
}

Metadata

Metadata

Assignees

Type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions