-
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
Add DAO files for compatibility with SearchKit #172
Comments
This would be particularly important for the upcoming replacement of the contribution tab with SearchKit. |
Hm ... DAO files for ...? Receipts? DonrecSnapshot records? I'm not sure I understand what exactly "doesn't work" and how this would not imply extensive refactoring of current data structures. Could you line out what you have in mind? |
@jensschuppe this extension installer creates 2 tables: |
imho, this issue is mainly not about donrec_snapshot and donrec_profile! These both are very special entities that are most probably not needed outside of the donrec extension. However, for the information whether a contribution is already included in a donation receipt (let's call this "donation receipt status"), the situation is completely different: As you know, this "donation receipt status" is included in the contribution list of a contact by some kind of "hijacking" by donrec to display an extra column. This has worked well for a long time. But currently, the core team is making strong efforts to replace the old quickform stuff with SearchKit displays. So very soon, the current way of displaying the donrec receipt status of a contribution won't work anymore, which makes this issue PRETTY URGENT: -> The underlying issue is that the "donrec status" of a contribution currently is not easily available with SearchKit! As far as I understand @colemanw 's issue, this is because of missing DAOs. But maybe I am missing something... |
Those two tables are not used for storing whether a contribution has been receipted etc., this information lives in custom fields in multi-value custom groups on contacts and contributions and is being injected into Core views of contributions via I'd say that SearchKit could be used to display receipt information using the Necessary steps:
Also, multi-value custom groups need to be imlicitly I suppose the current old-style views of contributions will not disappear soon and their SearchKit replacements will first be implemented in the admin_ui extension, right, @colemanw? |
Not right away, but it also sounds like it won't be too hard to get this extension working with SearchKit
Should be simple enough - just one word of caution. EntityRef fields get a real foreign-key-constraint in the database. So they must contain only valid foreign key references. Since the field currently has no constraint, it could be corrupted as easily as the referenced entity being deleted. More work in the short-term but better in the long-term would be to convert your |
Yep, good point, already created #175 for that. That's really old code which nobody bothered to refactor ... Ad making @colemanw, what would be required for those multi-value custom groups to be available as With entities in SearchKit? |
"bothered" = "dared" :-) |
Maybe I've missed the bigger picture here. If this extension keeps all meaningful data in custom fields, then it should already work fine with SearchKit without any refactoring. |
I tried to set up a Contribution search, which does not seem to allow joining with multi-value custom groups obviously. For contacts, this works. I now recognize we've created a multi-value custom group for contributions which is not supposed to exist, at least the UI does not allow this. |
@jensschuppe I thought I'd do a quick PR as an answer. Well that was a rabbit hole... 36 hours later I fought and won against the bad Quickform code. Here it is: civicrm/civicrm-core#27549 |
👍 Nice job, @colemanw!
What would be needed to officially allow |
@jensschuppe I believe that PR does make them joinable in SearchKit. That was the intention anyway, as it lifts the hard-coded assumption that the multi-record group always joins to Contact. |
With CiviCRM 5.67.0 (includes the PR as far as I understand) and donrec 2.2.4 I am still not able to join Contribution with a multi-value custom group for Contributions. Our usecase is what Detsieber explained above. |
It looks like missing DAO files are the reason this extension doesn't work with SearchKit.
Adding them might not be too hard.
The text was updated successfully, but these errors were encountered: