discourse/spec
Krzysztof Kotlarek 38ab45cb93
FIX: check min tag count requirement when change category (#12252)
When a category is created, we can set `minimum_required_tags` property.

When the topic is created, we are checking that field and ensuring that the minimum amount of tags were added - unless topic created by a staff member.

Problem is that validation is skipped when we change the category from for example category with 0 tags required to the category with 1 tag required.

Changing category is kind of the unicorn as it is a complicated operation:

https://github.com/discourse/discourse/blob/master/lib/post_revisor.rb#L84

https://github.com/discourse/discourse/blob/master/app/models/topic.rb#L911

https://github.com/discourse/discourse/blob/master/app/models/topic.rb#L823

Before we start to try to change the category, we should ensure that the tags requirement is fulfilled.

https://meta.discourse.org/t/the-category-setting-for-tags-is-not-respected/181214
2021-03-03 10:59:23 +11:00
..
components FIX: check min tag count requirement when change category (#12252) 2021-03-03 10:59:23 +11:00
fabricators FEATURE: New way to dismiss new topics (#11927) 2021-02-04 11:27:34 +11:00
fixtures FIX - use ImageMagick to determine size of svg images (#12230) 2021-03-01 11:44:00 -05:00
helpers A11Y: sets the html lang to user's locale when possible (#12007) 2021-02-10 16:12:09 +01:00
import_export FEATURE: Rake task to export groups (#9450) 2020-04-17 14:59:54 -07:00
initializers FIX: We need to skip users with associated reviewables when auto-approving (#9080) 2020-03-02 14:33:52 -05:00
integration FIX: do not send rejection emails to auto-deleted reviewable users (#12160) 2021-02-22 18:37:47 +05:30
integrity DEV: Add i18n fallback specs (#11669) 2021-01-08 17:47:28 +01:00
jobs FEATURE: Add a site setting to allow emojis to come from an external URL (#12180) 2021-03-02 16:04:16 -03:00
lib FIX - use ImageMagick to determine size of svg images (#12230) 2021-03-01 11:44:00 -05:00
mailers FEATURE: Add English (UK) as locale (#11768) 2021-01-20 21:32:22 +01:00
models FIX: Topic#invite_group failed to notify users on newly created topic (#12255) 2021-03-02 15:46:50 +01:00
multisite DEV: Prevents rate limits for new feature checks on multisite (#12053) 2021-02-12 08:52:59 -05:00
requests DEV: APIs for plugin to add custom reviewable confirm modal (#12246) 2021-03-02 10:28:27 -06:00
script/import_scripts DEV: If disabled do not change setting after import (#12142) 2021-02-19 09:33:35 -07:00
serializers FIX: do not show SSO last payload to moderators (#12084) 2021-02-15 16:12:06 +05:30
services FIX: Skip sending PM email for user silence (#12240) 2021-03-02 09:18:09 +10:00
support SECURITY: Attach DiscourseConnect (SSO) nonce to current session (#12124) 2021-02-18 10:35:10 +00:00
tasks FIX: remove migrate_from_s3 task that silently corrupts data (#11703) 2021-01-17 22:33:29 +01:00
views/omniauth_callbacks
rails_helper.rb DEV: Update DB.after_commit to be compatible with 'real' transactions (#11294) 2020-12-08 11:03:31 +11:00
swagger_helper.rb api docs example (#11997) 2021-02-08 10:09:44 -07:00