Skip to content

Conversation

@vvpoglazov
Copy link

@vvpoglazov vvpoglazov commented Feb 12, 2026

Description:
The fix_version field exists on the Finding model (CharField, max_length=100)
and is already handled by the reimporter (default_reimporter.py lines 683, 803),
but was missing from the Generic Findings Import parser for both JSON and CSV formats.

This meant users could see and edit fix_version in the UI, but could not
populate it via Generic Findings Import.

Changes:

  • json_parser.py: Added fix_version to the allowed fields set
  • csv_parser.py: Added fix_version field parsing
  • Added test scan files (JSON + CSV) with fix_version data
  • Added unit tests for both formats
  • Updated parser documentation

Test results:
Added two unit tests in unittests/tools/test_generic_parser.py:

  • test_parse_json_with_fix_version
  • test_parse_csv_with_fix_version

Also manually verified via API reimport that fix_version populates correctly
on findings.

Checklist:

  • Make sure to rebase your PR against the very latest dev.
  • Features/Changes should be submitted against the dev.
  • Bugfixes should be submitted against the bugfix branch.
  • Give a meaningful name to your PR, as it may end up being used in the release notes.
  • Your code is flake8 compliant.
  • Your code is python 3.13 compliant.
  • If this is a new feature and not a bug fix, you've included the proper documentation in the docs at https://github.com/DefectDojo/django-DefectDojo/tree/dev/docs as part of this PR.
  • Model changes must include the necessary migrations in the dojo/db_migrations folder.
  • Add applicable tests to the unit tests.
  • Add the proper label to categorize your PR.

The fix_version field exists on the Finding model and is already
handled by the reimporter (default_reimporter.py lines 683, 803),
but was missing from the Generic Findings Import parser for both
JSON and CSV formats.

Changes:
- json_parser.py: add fix_version to allowed fields set
- csv_parser.py: add fix_version field parsing
- Add unit tests for both JSON and CSV
- Update documentation
Copy link
Contributor

@mtesauro mtesauro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants