Add richtext custom field support - #8
Merged
Merged
Conversation
QA Sphere now supports rich text custom fields (notably the Description field), exported as custom_field_richtext_<systemName> columns. Add a richtext type so CSV import converters can target it instead of dumping descriptions into Preconditions. - Add CustomFieldTypeRichtext, producing custom_field_richtext_* headers - Drop the max=255 validation on CustomFieldValue.Value: the backend stores values as TEXT with no length validation for any field type. The only real constraint is that dropdown values must match a defined option (options are capped at 255 chars), so enforce 255 for dropdown values only - Document that richtext values are HTML (sanitized on import via tag allowlist), unlike markdown Preconditions/Steps - Update the Preconditions doc comment to stop suggesting it for descriptions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
QA Sphere now supports rich text custom fields — notably the new Description field, exported as a
custom_field_richtext_descriptioncolumn with a JSON-encoded value. This adds arichtexttype so CSV import converters can target it properly instead of dumping source-TMS descriptions into Preconditions.CustomFieldTypeRichtext("richtext"), included in validation, producingcustom_field_richtext_<systemName>headers.max=255cap onCustomFieldValue.Value. Verified against the QA Sphere backend: custom field values are stored asTEXTwith no length validation for any type — the cap never matched a real constraint. The only real limit is indirect: dropdown values must match a defined option, and option values areVARCHAR(255)— so 255 is now enforced for dropdown values only, giving early feedback on the one case that would actually fail import.<p>…</p>,<pre><code>…</code></pre>), unlike Preconditions/Steps which take markdown. The backend sanitizes richtext via a bluemonday tag allowlist (disallowed markup is stripped). Doc comments on the type + a new "Custom Fields" README section.TestCase.Preconditionsdoc comment to stop suggesting it for descriptions.Verification
backup_DES.csvfrom the DES demo project): same header, same{"value":"<p>…</p>"}cell format. The library additionally emitsisDefault:false, which the import parser explicitly accepts (it reads onlyvalue/isDefault; extra keys are ignored) — existing text/dropdown output stays byte-identical.make testandmake lintpass.