Fix pricefield pseudoconstant.
authoreileen <emcnaughton@wikimedia.org>
Wed, 20 May 2020 02:58:52 +0000 (14:58 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 21 May 2020 22:23:41 +0000 (10:23 +1200)
commit4f238b49c5a1e43adbc136b8cfd7321716e752ed
tree13ffe2e4f2e5c1d6157d33a8fbbb6acdf2986602
parent8e268efcf1363eb8b64ce7bd3b72c627c61d8d96
Fix pricefield pseudoconstant.

The price field turns out not to be returning pseudoconstant fields for 2 reasons
1) the label field is defined but the name field is not
2) any price fields with no domain are filtered out. In my single domain db this is
all of them.

I think we can safely understand NULL domain_id as 'not restricted by domain'. For some tables
(membershipType) it is a required field but for PriceField it is not.

I would be inclined to say it should be required less often. However, where it is required thenn
the OR IS NULL should never be true
CRM/Core/PseudoConstant.php
CRM/Price/BAO/PriceField.php
CRM/Price/BAO/PriceSet.php
CRM/Price/DAO/PriceField.php
api/v3/Generic.php
tests/phpunit/CRM/Price/BAO/PriceFieldTest.php
tests/phpunit/CRM/Price/BAO/PriceSetTest.php
xml/schema/Price/PriceField.xml