Skip to content

[#6217] allow choosing document summaries for ZGW registrations#6299

Open
SonnyBA wants to merge 1 commit into
mainfrom
feature/6217-zgw-registration-document
Open

[#6217] allow choosing document summaries for ZGW registrations#6299
SonnyBA wants to merge 1 commit into
mainfrom
feature/6217-zgw-registration-document

Conversation

@SonnyBA
Copy link
Copy Markdown
Contributor

@SonnyBA SonnyBA commented May 18, 2026

Closes #6217

Changes

Allows form builders to specify which registration summary documents they want to include for requests to the configured ZGW API:

image

Checklist

Check off the items that are completed or not relevant.

  • Impact on features

    • Checked copying a form
    • Checked import/export of a form
    • Config checks in the configuration overview admin page
    • Checked new model fields are usable in the admin
    • Problem detection in the admin email digest is handled
  • Dockerfile/scripts

    • Updated the Dockerfile with the necessary scripts from the ./bin folder
  • Commit hygiene

    • Commit messages refer to the relevant Github issue
    • Commit messages explain the "why" of change, not the how
  • Documentation

    • Added documentation which describes the changes

[skip: e2e]

@SonnyBA SonnyBA force-pushed the feature/6217-zgw-registration-document branch 7 times, most recently from b895ff3 to d024608 Compare May 18, 2026 12:48
@SonnyBA SonnyBA marked this pull request as ready for review May 18, 2026 12:57
@codecov
Copy link
Copy Markdown

codecov Bot commented May 18, 2026

Codecov Report

❌ Patch coverage is 98.21429% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 97.07%. Comparing base (f9695ad) to head (6204449).

Files with missing lines Patch % Lines
...penforms/registrations/contrib/zgw_apis/options.py 80.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6299   +/-   ##
=======================================
  Coverage   97.07%   97.07%           
=======================================
  Files         866      868    +2     
  Lines       32755    32798   +43     
  Branches     2981     2983    +2     
=======================================
+ Hits        31797    31839   +42     
- Misses        646      647    +1     
  Partials      312      312           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@SonnyBA SonnyBA self-assigned this May 18, 2026
@SonnyBA SonnyBA force-pushed the feature/6217-zgw-registration-document branch 2 times, most recently from 6b7f278 to 3f1eb28 Compare May 18, 2026 13:31
Comment thread src/openforms/js/compiled-lang/nl.json Outdated
Comment thread src/openforms/contrib/zgw/service.py Outdated
Comment thread src/openforms/contrib/zgw/service.py Outdated
Comment thread src/openforms/registrations/contrib/zgw_apis/options.py Outdated
Comment thread src/openforms/registrations/contrib/zgw_apis/typing.py Outdated
Comment on lines +468 to +470
all_values = state.get_data(include_static_variables=True)
variables = [key for key in all_values]
values = {key: all_values[key] for key in variables}
Copy link
Copy Markdown
Contributor

@viktorvanwijk viktorvanwijk May 19, 2026

Choose a reason for hiding this comment

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

A few questions/remarks about this:

  1. What exactly are you trying to achieve here? Won't all_values just equal values at the end?
  2. Iterating over a FormioData instance is not allowed, because you will not get the full variable keys if there is nested data. For example, component with key "foo.bar" will be present in the data as {"foo": {"bar": "baz"}}, so iterating over it will just give you "foo".
  3. Does it make sense to include static variables here? I don't think they are in the PDF summary right?

Also, I think we need some processing of the values and schema here. Looking at the generic json plugin, partners and children data need to be cleaned up. Also, I'm not sure if it makes sense to include the submission data from file components as is, because it just contains metadata about the upload to the server. Would it be possible to relate it to the created attachment documents, like in the Objects API?

Given that it's the third plugin that requires this data cleanup, perhaps this is the part that can be refactored/generalized? Specifically processing partners and children will be the same for all plugins I think. (still a bit unclear to me whether this is worth it tbh, because there is also plugin-specific things happening)

Comment thread src/openforms/registrations/contrib/zgw_apis/plugin.py Outdated
Comment thread src/openforms/registrations/contrib/zgw_apis/plugin.py Outdated
Comment thread src/openforms/conf/locale/nl/LC_MESSAGES/django.po
Comment thread src/openforms/forms/migrations/0130_set_default_summary_documents.py Outdated
Comment thread src/openforms/forms/migrations/0130_set_default_summary_documents.py Outdated
Comment thread src/openforms/forms/migrations/0130_set_default_summary_documents.py Outdated
Comment thread src/openforms/registrations/contrib/zgw_apis/typing.py Outdated
@SonnyBA SonnyBA force-pushed the feature/6217-zgw-registration-document branch from 3f1eb28 to 6204449 Compare May 20, 2026 17:24
@SonnyBA SonnyBA force-pushed the feature/6217-zgw-registration-document branch from 6204449 to ee2d74e Compare May 22, 2026 07:47
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.

Allow a JSON-document to be added instead of a PDF with ZGW

3 participants