-
-
Notifications
You must be signed in to change notification settings - Fork 825
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
SearchKit - Allow creation of new records via in-place edit #22376
SearchKit - Allow creation of new records via in-place edit #22376
Conversation
(Standard links)
|
67054ea
to
c981ee7
Compare
@colemanw I tested this & was able to create an edit in place email field and could either edit or create using the field. When creating it fill in is_primary and location_type_id were both not null. I added other entities (phone, website, related contact & activity) and it did not work for any of them - I can't see any entity hard-coding so it must be in the metadata somewhere? You can't specify the location type id - I can think of some edge cases where it would be better if you could but out of scope. |
Ok @eileenmcnaughton, I'll take another look. But first I want to get #22358 resolved because that validation logic will be needed here as well. I'm going to revisit that PR shortly and make any changes needed to resolve your concerns. |
c981ee7
to
61753b3
Compare
@eileenmcnaughton I've got this rebased and working now. Added basic validation so you can't enter a blank value when creating a new record, and fixed it to work with multiple joins. |
test this please |
I'm not sure what that fail was (it was one of those ones you have to trawl the console log for) so I've just set it re-running in the hope... |
61753b3
to
a3ef0df
Compare
a3ef0df
to
35ceb7e
Compare
Allows e.g. an email record to be created if one does not already exist. Fixes dev/core#2853
35ceb7e
to
129e10b
Compare
@eileenmcnaughton I spotted the problem & fixed. It's passing now. |
OK - seems to work in r-run |
I confirm it works on 5.47.3 we were able to record an e-mail address when there wasn't one |
thanks for testing @ALLINAPPLI |
Overview
Allows e.g. an email record to be created if one does not already exist via in-place edit.
Before
For joined records (e.g. email), SeachKit in-place edit would not work if one did not already exist.
After
Now you can create a new record, same as editing an existing one.
Technical Details
The create params get taken from the join clause. E.g. if you join on an email with a clause like
"location type = work" and "is_primary = true"
then when creating via edit-in-place the new email will have those values (primary, work).Comments
@eileenmcnaughton requested this: dev/core#2853