mirror of
https://github.com/discourse/discourse.git
synced 2026-08-06 02:11:32 +08:00
### What Since #36678, `tag-chooser`/`mini-tag-chooser` emit an array of tag **objects** instead of tag name strings. Two consumers still assumed name strings and broke: 1. **RSS polling feed form** — the client-side required-tag validation compared the category's required tag *names* against the selected tag *objects*, so the comparison always failed. A feed pointed at a category with a required tag group could never be saved from the UI, even when the required tag was selected (reported on meta). 2. **Chat "archive channel → new topic"** — the selected tags were POSTed as objects, which the controller's `tags: []` strong parameter rejects, so the destination topic was created without any of the chosen tags. ### Fix Both consumers now map the tag objects to their `.name` before comparing / submitting, matching what the server (`normalize_tags`) and select-kit's own `validateCreate` already do. ### Tests Extended the existing system specs rather than adding new ones: - RSS polling admin spec: the "saves the configuration" test's category now requires the tag it selects, so the save exercises the required-tag validation. - Chat archive spec: the "works" test now selects a tag and asserts it reaches the archive (`destination_tags`). |
||
|---|---|---|
| .. | ||
| assets/javascripts | ||