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

Create a prefill plugin to prefill with values from an external reference (initially only for Objects API) #4396

Closed
Tracked by #4266
stevenbal opened this issue Jun 17, 2024 · 1 comment · Fixed by #4619 or #4620

Comments

@stevenbal
Copy link
Contributor

stevenbal commented Jun 17, 2024

Add advanced settings for Objects API registration to store the necessary config (with a button to populate it from the registration configuration). These advanced settings should contain:

  • what Objects API group to use
  • what Objecttype to use
  • path to the BSN in the object

Replace the current way of prefilling in the form Variables tab by adding a button Configure to open a modal. In this modal you can configure the required prefill information and also modify the general config for the Objects API prefill. -> this modal already exists, the implementation of the form is part of #4608

Based on the selected plugin the other fields might vary. I think our current prefill options only require Prefill attribute and Prefill identifier role. For the Objects API plugin, we should also show the advanced settings mentioned above and indicate that this is form level configuration. We could split the modal to indicate the difference between this form level config and the variable level config. This modal is to avoid having to switch back and forth between tabs and reopening the modal, which isn't great UX

@stevenbal stevenbal added this to the Release 2.8.0 milestone Jun 24, 2024
@vaszig vaszig self-assigned this Jul 22, 2024
@vaszig vaszig moved this from Todo to In Progress in Development Jul 22, 2024
vaszig added a commit that referenced this issue Aug 26, 2024
This will be used to store all the needed configuration-options for the prefill plugin
vaszig added a commit that referenced this issue Aug 26, 2024
This is based on retrieving the specific objecttype version and based on
the JsonSchema we define the available attributes.
vaszig added a commit that referenced this issue Aug 27, 2024
This is not the whole prefill plugin functionality. This commit handles
the procedures in order to be able to send to the frontend the available
attributes (for mapping the form variable with the objecttype attribute)
depending on the selected objecttype's version.
vaszig added a commit that referenced this issue Aug 27, 2024
vaszig added a commit that referenced this issue Aug 27, 2024
This is not the whole prefill plugin functionality. This commit handles
the procedures in order to be able to send to the frontend the available
attributes (for mapping the form variable with the objecttype attribute)
depending on the selected objecttype's version.
vaszig added a commit that referenced this issue Oct 10, 2024
vaszig added a commit that referenced this issue Oct 10, 2024
vaszig added a commit that referenced this issue Oct 15, 2024
vaszig added a commit that referenced this issue Oct 18, 2024
vaszig added a commit that referenced this issue Oct 18, 2024
vaszig added a commit that referenced this issue Oct 18, 2024
vaszig added a commit that referenced this issue Oct 24, 2024
vaszig added a commit that referenced this issue Oct 24, 2024
vaszig added a commit that referenced this issue Oct 25, 2024
sergei-maertens added a commit that referenced this issue Oct 25, 2024
Seems to pass the tests and simplifies the code a little. The try-except
should not happen because of the way form variables are created/synced
from formio definitions, and if it happens, we want to be notified of
it via error monitoring.

Additionally, we can apply the post-processing special treatment for
component sources, and leave the default behaviour for everything else,
rather than potentially missing some cases if additional sources get
added in the future.

The variable itself is already mutated during the saving of prefill
data, so just updating the dict holding the [key, value] pairs is
sufficient.
sergei-maertens added a commit that referenced this issue Oct 25, 2024
…refill-implement-plugin

[#4396] Objects API prefill plugin
@github-project-automation github-project-automation bot moved this from Implemented to Done in Development Oct 25, 2024
@sergei-maertens
Copy link
Member

reopening because I can't tell if anything else is needed for this ticket 😬

@github-project-automation github-project-automation bot moved this from Done to In Progress in Development Oct 25, 2024
@sergei-maertens sergei-maertens moved this from In Progress to Implemented in Development Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment