-
Notifications
You must be signed in to change notification settings - Fork 26
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
[#4396] Objects API prefill plugin #4620
base: master
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4620 +/- ##
==========================================
- Coverage 96.56% 96.54% -0.03%
==========================================
Files 746 750 +4
Lines 25210 25340 +130
Branches 3322 3341 +19
==========================================
+ Hits 24345 24465 +120
- Misses 602 611 +9
- Partials 263 264 +1 ☔ View full report in Codecov by Sentry. |
66ed5a5
to
482bc20
Compare
0ee299f
to
2b992bf
Compare
2b6a3f0
to
8eb07c9
Compare
2b992bf
to
50c9377
Compare
8eb07c9
to
0d9f00c
Compare
50c9377
to
70f0382
Compare
0d9f00c
to
b7e03db
Compare
7ac1670
to
71cc7e8
Compare
70f0382
to
0dfe280
Compare
7b222b9
to
59304cb
Compare
a7c3df4
to
e60e61c
Compare
0b5b2cd
to
1a4c02c
Compare
1a4c02c
to
110283f
Compare
return patch( | ||
"openforms.prefill.service.inject_prefill", | ||
new=MagicMock, | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this broken now because of the local import?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see a problem here in the tests and if I remove this the tests are failing.
050232d
to
cf2bb25
Compare
cf2bb25
to
13938ae
Compare
| ( | ||
~EMPTY_PREFILL_PLUGIN | ||
& EMPTY_PREFILL_ATTRIBUTE | ||
& EMPTY_PREFILL_OPTIONS | ||
& ~USER_DEFINED | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't understand this one -
~USER_DEFINED
impliesCOMPONENT
(since there are only two options)~EMPTY_PREFILL_PLUGIN
implies that a plugin is selected.
this is the behaviour of the master branch - and here the check constraint says that then also the attribute must be set: ~EMPTY_PREFILL_ATTRIBUTE
, but the code here allows/requires an empty attribute 🤔
shouldn't this combination be disallowed entirely? You then end up with the following options:
- no prefill configured at all (no plugin selected -> no attribute or options may be set)
- "previous" prefill configuration (plugin selected, attribute selected -> prefill options must be empty), can be used for both components and user defined vars
- "new" prefill configuration (plugin selected, options set -> attribute may not be set, source must be user defined)
I think this union member is not needed then?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will remain (if I am not mistaken) because of the comment below
#4620 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unresolving this as a reminder so that we can discuss this at the end of the day to make sure I understand everything correctly!
3aa0da1
to
96023e0
Compare
96023e0
to
25a6f91
Compare
…lugin for ObjectsApi
25a6f91
to
2890501
Compare
Closes #4396 partially
Changes
prefill_options
to theFormVariable
model (for storing all the needed configuration) and updated constraints according to new fieldprefill.service
Checklist
Check off the items that are completed or not relevant.
Impact on features
Release management
I have updated the translations assets (you do NOT need to provide translations)
./bin/makemessages_js.sh
./bin/compilemessages_js.sh
Commit hygiene