dev/core#1285 import support for campaign_id (& other fields where it could be an...
authoreileen <emcnaughton@wikimedia.org>
Tue, 8 Oct 2019 16:51:13 +0000 (18:51 +0200)
committereileen <emcnaughton@wikimedia.org>
Tue, 8 Oct 2019 16:53:47 +0000 (18:53 +0200)
commit9ae10cd783253ca3908bbb9712183b017b0ebbf5
tree57889448e56101bd2e23617378a906ae7a3f8653
parentd375fc0639def7161d45a9d9e684bc8b1dbb2782
dev/core#1285 import support for campaign_id (& other fields where it could be an id, a name or a label.

After digging into https://lab.civicrm.org/dev/core/issues/1285 it feels a little arguable what we should support but issues in
gitlab indicate there is at least some demand for id & label so it now will
- accept id if input matches an id
- accept name if input matches a name
- accept label if input matches a label.

This means for payment instrument it would accept '1', 'Check' or 'Cheque' (in that order if name were renamed).

This should apply to a few fields - payment instrument, constribution status & per the issue campaign
(on contribution). There are 'some' on membership too I think
CRM/Import/Parser.php
tests/phpunit/CRM/Contribute/Import/Parser/ContributionTest.php