Skip to content
This repository has been archived by the owner on Feb 24, 2020. It is now read-only.

Fix saving custom data & add test #167

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

Fix saving custom data & add test #167

wants to merge 4 commits into from

Conversation

colemanw
Copy link
Member

@colemanw colemanw commented Jun 14, 2019

Before

Custom field saving was broken for some entities.

After

Works for all entities; locked in by conformance test.

Notes

Depends on civicrm/civicrm-core#14535

@civibot civibot bot added the master label Jun 14, 2019
@colemanw
Copy link
Member Author

/test

1 similar comment
@colemanw
Copy link
Member Author

/test

@colemanw
Copy link
Member Author

@monishdeb any idea about these 2 test failures?

@monishdeb
Copy link
Member

hmm checking

@monishdeb
Copy link
Member

/test

@colemanw
Copy link
Member Author

@monishdeb

Test Result (2 failures / +2)
Civi\Test\Api4\Action\CreateWithOptionGroupTest.testGetWithCustomData
Civi\Test\Api4\Action\CreateWithOptionGroupTest.testWithCustomDataForMultipleContacts

@colemanw
Copy link
Member Author

@monishdeb I've done a rebase to keep the branch up-to-date. Any luck with the test failures?

@colemanw
Copy link
Member Author

/test

@eileenmcnaughton
Copy link
Contributor

@colemanw in apiv3/ core the callApiSuccess wrapper (mostly) makes sure the sql is out put in fails like this one
https://test.civicrm.org/job/Extension-SHA/578/testReport/junit/(root)/Civi_Test_Api4_Action_CreateWithOptionGroupTest/testGetWithCustomData/

which is really helpful

@monishdeb how are you placed on this - I am under the impression this is blocked on your availablity and in turn is the blocker for api v4 in core for 5.16 (also ping @seamuslee001 )

@colemanw
Copy link
Member Author

colemanw commented Jul 1, 2019

@eileenmcnaughton I'm going to try to move this along, but there are 2 biggies in api4 which IMO should get addressed before inclusion in core:

  • joins are partially broken
  • getting/saving fields with pseudoconstants (e.g. being able to pass "Meeting" as acvtivity_type_id)

@eileenmcnaughton
Copy link
Contributor

@colemanw if we moved into core in time for 5.16 rc could we resolve those 2 during the rc period (without too much change outside the apiv4 part of the codebase)?

@colemanw
Copy link
Member Author

colemanw commented Jul 2, 2019

Hey @monishdeb could you say more about your last commit? The message is "minor fix" but it's a big change and I'm not sure what it's doing.

@monishdeb
Copy link
Member

@colemanw yes the commit title was a bit misnomer. Actually, the last commit was about when we get custom table name civicrm_value_* for joins here I added a CoreUtil fn to fetch jonable $links on basis of a custom table name. But then I was stuck on how we could possible add a Bridgable join between custom field/group and custom table :(

@colemanw
Copy link
Member Author

colemanw commented Jul 3, 2019

Ok thanks @monishdeb. I'll look into it.

@monishdeb
Copy link
Member

Thanks :)

@eileenmcnaughton
Copy link
Contributor

/test

1 similar comment
@totten
Copy link
Member

totten commented Jul 11, 2019

/test

@eileenmcnaughton
Copy link
Contributor

@monishdeb @colemanw in the interests of trying to move this along a bit I pulled out the stale commit into it's own PR so we can get it merged & sorted #167

@eileenmcnaughton
Copy link
Contributor

@colemanw as I understand it this is still the blocker to getting apiv4 moved into core & it's in your court?

$entity = CustomGroup::get()
->addSelect('extends')
->addWhere('table_name', '=', $tableName)
->execute()
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Must disable permission check here.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants