Hola
Soy nuevo en el uso de plantillas de formularios, así que espero que sea solo que me estoy pasando por alto algo.
He creado una plantilla de formulario que llena un menú desplegable desde un grupo de etiquetas, lo cual se muestra correctamente, pero no me permite seleccionar nada.
La categoría sí tiene 3 grupos de etiquetas restringidos a ella, con la opción “permitir también otras etiquetas” desmarcada
No hay categorías especificadas en el “grupo de etiquetas requerido”, aunque idealmente me gustaría tener los mismos 3 grupos de etiquetas especificados aquí
El YAML de mi formulario es:
- type: tag-chooser
id: issue-type
tag_group: "Issue Type"
attributes:
none_label: "Select a type"
label: "Type"
multiple: false
validations:
required: true
- type: tag-chooser
id: issue-priority
tag_group: "Issue Priority"
attributes:
none_label: "Select a priority"
label: "Priority"
multiple: false
validations:
required: true
La vista previa carga correctamente:
Pero el formulario en sí, al crear un tema, no me permite seleccionar ninguna etiqueta:
Todos los grupos de etiquetas tienen una configuración similar:
Agradezco cualquier ayuda. Como dije, espero que sea algo sencillo
¿Y eso incluye los grupos de etiquetas que estás usando aquí («Tipo de incidencia» y «Prioridad de incidencia»)?
¡Gracias por la respuesta!
Sí, esos dos están incluidos
Tengo problemas para reproducir el problema en local. @Parker1090 , ¿qué versión de Discourse estás ejecutando?
2026.6.0-latest (c61074ebf8)
Con gusto puedo proporcionar cualquier otro detalle que sea necesario
Gracias, logré reproducir el problema localmente usando nombres de etiquetas con mayúsculas y minúsculas mezcladas.
main ← fix-form-template-tag-chooser-uppercase
opened 09:40PM - 28 May 26 UTC
When a form template `tag-chooser` field is populated from a tag group, each
`<o… ption>` is rendered with its display value (the tag name upper-cased, or its
description). Selecting an option then has to translate that display value back
to the underlying tag name before storing it on the composer.
`handleSelectedValues` did this translation by lower-casing the option value
(`"HIGH"` -> `"high"`) and `handleInput` matched the result case-sensitively
against the real tag names. On sites with `force_lowercase_tags` disabled, tag
names keep their casing (e.g. `"High"`), so the reconstructed `"high"` never
matched, the selection was silently dropped, and the dropdown reset to its
placeholder. Lower-case tag names round-tripped fine, which is why this only
affected sites allowing mixed-case tags.
This regressed in ed8a62e2729, which switched the option value from the tag
name to the upper-cased display and reintroduced the lower-casing round-trip to
reverse it.
Instead of guessing the casing, build a map of each choice's display value back
to its exact tag name and look the selected option up in it. Selections are now
preserved regardless of tag name casing. Adds a system spec covering tag names
with uppercase characters and `force_lowercase_tags` disabled.
¡Increíble, gracias por tu ayuda!