Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZGW UX improvements: select document type #4817

Open
wants to merge 14 commits into
base: master
Choose a base branch
from

Conversation

sergei-maertens
Copy link
Member

@sergei-maertens sergei-maertens commented Nov 11, 2024

Closes #4606 (partially

TODO

  • Implement API endpoint to return available document types
  • Implement registration plugin runtime behaviour changes
  • Automatically select best version of document type

Changes

  • Allow selecting the document type in a dropdown after the case type is selected
  • Registration prefers the new config option if set, otherwise fall back to legacy behaviour

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
    • Problem detection in the admin email digest is handled
  • Release management

    • I have labelled the PR as "needs-backport" accordingly
  • I have updated the translations assets (you do NOT need to provide translations)

    • Ran ./bin/makemessages_js.sh
    • Ran ./bin/compilemessages_js.sh
  • Commit hygiene

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

Copy link

codecov bot commented Nov 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.58%. Comparing base (51f9713) to head (978d252).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #4817   +/-   ##
=======================================
  Coverage   96.57%   96.58%           
=======================================
  Files         748      748           
  Lines       25448    25501   +53     
  Branches     3369     3380   +11     
=======================================
+ Hits        24576    24629   +53     
  Misses        608      608           
  Partials      264      264           

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

Once a case type is selected, the available document type options are
fetched from the backend and we only store the 'description' field
value in the configuration options.
Added the serializer option to specify a document type via its
description, rather than having to provide a fully qualified URL.
The serializer that produces the available document types is now
properly in English, to be consistent with the rest of the serializers.

This requires an update to the formio-builder too.
Replaced endpoints with their English variant for consistency.
Tests broke due to changes in behaviour, but the assertions were not
updated accordingly yet.
The specified document type is now dynamically resolved within the
case type of the created case, using the submissions completion
time to determine the correct version to use.

The legacy configuration options now emit deprecation warnings, but will
still be supported for the foreseeable future.
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.

Make ZGW registration options consistent with Objects API
1 participant