Skip to content

Database Export - Add possibility to export surveys (tokens) - #14279

Open
Pa-Touche wants to merge 3 commits into
developmentfrom
feat/14249-survey-tokens-export
Open

Database Export - Add possibility to export surveys (tokens)#14279
Pa-Touche wants to merge 3 commits into
developmentfrom
feat/14249-survey-tokens-export

Conversation

@Pa-Touche

@Pa-Touche Pa-Touche commented Aug 14, 2026

Copy link
Copy Markdown
Contributor

Fixes #14249

Summary by CodeRabbit

  • New Features
    • Added survey and survey-token tables to database export options.
    • Database exports now include survey data when the Surveys feature is enabled.
    • Added localized names for the new exportable tables.

@coderabbitai

coderabbitai Bot commented Aug 14, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: bb2b55fa-9a70-4ef4-b104-dfb78305e445

📥 Commits

Reviewing files that changed from the base of the PR and between 73084ce and 0566931.

📒 Files selected for processing (6)
  • sormas-api/src/main/java/de/symeda/sormas/api/importexport/DatabaseTable.java
  • sormas-api/src/main/resources/enum.properties
  • sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/DatabaseExportService.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/survey/Survey.java
  • sormas-backend/src/main/java/de/symeda/sormas/backend/survey/SurveyToken.java
  • sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java
💤 Files with no reviewable changes (1)
  • sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java

Included review availability: Your plan includes up to 2 reviews per rolling hour; 1 remains after this review.


📝 Walkthrough

Walkthrough

The database export configuration now supports the SURVEY and SURVEY_TOKEN tables when the SURVEYS feature is enabled. Entity table-name constants, localized captions, export registrations, and validation coverage were added or updated.

Changes

Survey database export

Layer / File(s) Summary
Survey table metadata
sormas-api/src/main/java/de/symeda/sormas/api/importexport/DatabaseTable.java, sormas-api/src/main/resources/enum.properties, sormas-backend/src/main/java/de/symeda/sormas/backend/survey/Survey.java, sormas-backend/src/main/java/de/symeda/sormas/backend/survey/SurveyToken.java
Adds feature-gated SURVEY and SURVEY_TOKEN entries, localized captions, and reusable entity table-name constants.
Export registration and validation
sormas-backend/src/main/java/de/symeda/sormas/backend/importexport/DatabaseExportService.java, sormas-backend/src/test/java/de/symeda/sormas/backend/importexport/DatabaseExportServiceTest.java
Registers both survey entities in database export configuration and removes them from the excluded-entity list in the export test.

Estimated code review effort: 2 (Simple) | ~10 minutes

Merge Risk: ⚪ Minimal · up to 05669

The change is merge-ready after normal checks and review; no actionable merge-blocking risk remains.

Suggested reviewers: raulbob, karnaiahpesula

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly describes the main change: adding database export support for surveys and survey tokens.
Description check ✅ Passed The description uses the required template and links the pull request to issue #14249.
Linked Issues check ✅ Passed The changes add survey-token database tables to export configuration and enable their export for usage analysis as required by issue #14249.
Out of Scope Changes check ✅ Passed The changes remain related to survey-token database export, including the supporting survey table and export validation updates.
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/14249-survey-tokens-export

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Pa-Touche
Pa-Touche requested a review from raulbob August 17, 2026 12:09
@Pa-Touche
Pa-Touche marked this pull request as ready for review August 17, 2026 12:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Database Export - Add possibility to export survey tokens

1 participant