Save mentions when markdown columns are directly saved to DB
What does this MR do?
makes sure _html
fields are parsed for mentions when updated directly to DB. This has come up as being skipped when a project is being imported for instance and then the _html
field for the markdown fields would be updated directly to DB skipping model callbacks, resulting in mentions missing from DB.
There is no specific issue for this fix, but related issues/discussions that revealed the problem:
- When checking migration results for the MRs mentions migration: !34378 (comment 385903758)
- Follow-up investgation/check of the MRs mentions migration: https://gitlab.com/gitlab-com/gl-infra/production/-/issues/2456
Screenshots
Does this MR meet the acceptance criteria?
Conformity
-
Changelog entry -
Documentation (if required) -
Code review guidelines -
Merge request performance guidelines -
Style guides -
Database guides -
Separation of EE specific content
Availability and Testing
-
Review and add/update tests for this feature/bug. Consider all test levels. See the Test Planning Process. -
Tested in all supported browsers -
Informed Infrastructure department of a default or new setting change, if applicable per definition of done
Security
If this MR contains changes to processing or storing of credentials or tokens, authorization and authentication methods and other items described in the security review guidelines:
-
Label as security and @ mention @gitlab-com/gl-security/appsec
-
The MR includes necessary changes to maintain consistency between UI, API, email, or other methods -
Security reports checked/validated by a reviewer from the AppSec team
Edited by Alexandru Croitor