-
-
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
Add ContributionProduct and EntityBatch APIv4 Entity #20505
Add ContributionProduct and EntityBatch APIv4 Entity #20505
Conversation
(Standard links)
|
@monishdeb I thought entity_batch was used for the batch entry screen - ie the screen altered by this pr #20394 & could hold contribution & membership |
api\v4\Entity\ConformanceTest::testConformance with data set "EntityBatch" ('EntityBatch') |
@eileenmcnaughton to reconfirm I did a membership & contribution batch entry and clicked 'Save & Continue Later' but that doesn't populate the entity_batch table. But if you do 'Accounting Batch Entry' it does populate the entity_batch table with financial_trxn entries and not sure in which case civicrm_contact entries are populated in this table. |
@monishdeb I think that adding a pseudoconstant would ONLY affect apiv4 - so it should be Ok to only add the one you know to be true - the contact one seems odd |
Ok will add the pseudoconstant then. Regarding contact, its the description about the entity_table here tells about that civicrm_contact could be one of the entity_table, but not sure when the civicrm_entity_batch is used to hold contact entries. On the otherhand, I will also submit a separate PR to make civicrm_contribution_product.product_id foreign key to civicrm_product.id (on delete null). |
@monishdeb do you it was maybe 'just a good idea' at some point? Perhaps we should merge directly after the rc is cut to be careful but I have doubts about including contact if it's not really possible to populate as that @demeritcowboy you are our sleuth.... can you find any want for civicrm_entity_batch.entity_table to be anything other than civicrm_financial_trxn ? |
a4d960d
to
6a657a5
Compare
jenkins test this please |
I have addressed point 1) under the Technical Details and submitted a PR for that #20553 |
I've seen 3 things that use the word batch:
I don't see anything obvious where entity_batch is used for non-financial-transaction, but there's nothing that says it couldn't be used by an extension for such. It seems there was an intent to allow it, but maybe nothing actually uses it for contacts etc:
It mentions Gift Aid - does someone know if that uses it for something other than financial? |
6a657a5
to
7c08d7b
Compare
@demeritcowboy @monishdeb I don't think resolving the pseudoconstant is a blocker on merging this. However, I found that giftaid DOES use this table with civicrm_contribution. I feel like we can somewhat rule out civicrm-contact based on discussion so far -but there DOES seem to be a need for extensions to edit what is supported. At the moment I'm leaning towards using an option group - I'm gonna see if @totten @colemanw @seamuslee001 have thoughts |
I've transferred the above ^^ to https://lab.civicrm.org/dev/core/-/issues/2682 and am merging this - let's discuss over there |
Overview
Add ContributionProduct and EntityBatch APIv4 Entity
Technical Details
I want to raise two points:
Comments
ping @colemanw @eileenmcnaughton @seamuslee001