civicrm-core.git
4 years agoMerge pull request #14728 from eileenmcnaughton/last_icing
colemanw [Fri, 12 Jul 2019 01:31:15 +0000 (21:31 -0400)]
Merge pull request #14728 from eileenmcnaughton/last_icing

[REF] final cleanup - call bulkCreate from migrate_utils

4 years agoMerge pull request #14800 from colemanw/mapperKeys
Eileen McNaughton [Fri, 12 Jul 2019 00:36:45 +0000 (12:36 +1200)]
Merge pull request #14800 from colemanw/mapperKeys

[REF] [EXPORT] Alter CRM_Export_BAO_Export::exportComponents

4 years agoMerge pull request #13487 from giant-rabbit/17880-after-first-reminder-for-membership-fix
Eileen McNaughton [Thu, 11 Jul 2019 23:44:38 +0000 (11:44 +1200)]
Merge pull request #13487 from giant-rabbit/17880-after-first-reminder-for-membership-fix

(dev/core#285) Fixed second membership reminder

4 years agoMerge pull request #14803 from eileenmcnaughton/ex5
colemanw [Thu, 11 Jul 2019 23:39:30 +0000 (19:39 -0400)]
Merge pull request #14803 from eileenmcnaughton/ex5

[REF] [Export] move build master copy array to ExportProcessor

4 years agoAlter CRM_Export_BAO_Export::exportComponents to accept standard MappingField format
Coleman Watts [Thu, 11 Jul 2019 21:24:51 +0000 (17:24 -0400)]
Alter CRM_Export_BAO_Export::exportComponents to accept standard MappingField format

4 years agoMerge pull request #14804 from eileenmcnaughton/eee
colemanw [Thu, 11 Jul 2019 23:31:50 +0000 (19:31 -0400)]
Merge pull request #14804 from eileenmcnaughton/eee

[REF] [Export] Remove code that seems unused

4 years agoMerge pull request #14802 from eileenmcnaughton/ex4
colemanw [Thu, 11 Jul 2019 23:30:11 +0000 (19:30 -0400)]
Merge pull request #14802 from eileenmcnaughton/ex4

[REF] [Export] Move setting of household properties to processor

4 years agoMerge pull request #14805 from civicrm/5.16
Eileen McNaughton [Thu, 11 Jul 2019 23:09:55 +0000 (11:09 +1200)]
Merge pull request #14805 from civicrm/5.16

5.16 to master

4 years agoMerge pull request #14789 from seamuslee001/fast_array_caches
Eileen McNaughton [Thu, 11 Jul 2019 23:09:27 +0000 (11:09 +1200)]
Merge pull request #14789 from seamuslee001/fast_array_caches

Ensure recently converted groups cache matches previous behabiour my …

4 years ago[REF] [Export] Remove code that seems unused
eileen [Wed, 10 Jul 2019 12:48:58 +0000 (00:48 +1200)]
[REF] [Export] Remove code that seems unused

I can't find any evidence of this code being re-refenced. We DO reference a similar one for merge_same_address

4 years agoMerge pull request #14801 from eileenmcnaughton/ee
Eileen McNaughton [Thu, 11 Jul 2019 22:26:19 +0000 (10:26 +1200)]
Merge pull request #14801 from eileenmcnaughton/ee

[REF] [Export] Minor code relocation

4 years ago[REF] [Export] move build master copy array to ExportProcessor
eileen [Thu, 11 Jul 2019 22:06:04 +0000 (10:06 +1200)]
[REF] [Export] move build master copy array to ExportProcessor

4 years agoMerge pull request #14799 from eileenmcnaughton/move_ex
Eileen McNaughton [Thu, 11 Jul 2019 21:56:07 +0000 (09:56 +1200)]
Merge pull request #14799 from eileenmcnaughton/move_ex

[REF] [Export] Move replace merge tokens to processor class

4 years agoMove setting of household properties to processor
eileen [Wed, 10 Jul 2019 13:04:42 +0000 (01:04 +1200)]
Move setting of household properties to processor

4 years agoMinor code relocation
eileen [Wed, 10 Jul 2019 12:46:36 +0000 (00:46 +1200)]
Minor code relocation

n

4 years agoMerge pull request #14795 from eileenmcnaughton/ex
Seamus Lee [Thu, 11 Jul 2019 21:22:30 +0000 (17:22 -0400)]
Merge pull request #14795 from eileenmcnaughton/ex

[REF] [EXPORT] Stop passing return Properties

4 years agoMove replace merge tokens to processor class
eileen [Thu, 11 Jul 2019 21:02:43 +0000 (09:02 +1200)]
Move replace merge tokens to processor class

4 years agoStop passing return Properties
eileen [Wed, 10 Jul 2019 12:30:03 +0000 (00:30 +1200)]
Stop passing return Properties

4 years agoMerge pull request #14797 from eileenmcnaughton/ex_address
colemanw [Thu, 11 Jul 2019 20:16:23 +0000 (16:16 -0400)]
Merge pull request #14797 from eileenmcnaughton/ex_address

[REF] [Export] Move function that parses tokens to address processor

4 years ago[REF] final cleanup - call bulkCreate from migrate_utils
eileen [Thu, 4 Jul 2019 01:07:55 +0000 (13:07 +1200)]
[REF] final cleanup - call bulkCreate from migrate_utils

This has a test CRM_Utils_Migrate_ImportExportTest although I had trouble running it without switching to
some hard-coding (at least in isolation). This switches the existing bulk create action over to use bulkCreate

4 years agoMerge pull request #14796 from eileenmcnaughton/ex2
colemanw [Thu, 11 Jul 2019 20:13:15 +0000 (16:13 -0400)]
Merge pull request #14796 from eileenmcnaughton/ex2

[REF] [EXPORT] Minor consolidation of weird mergeSameAddreess nightmare code

4 years agoMerge pull request #14694 from eileenmcnaughton/cust_field_bulk
colemanw [Thu, 11 Jul 2019 20:07:35 +0000 (16:07 -0400)]
Merge pull request #14694 from eileenmcnaughton/cust_field_bulk

dev/core#1093 add a bulkCreate action for many customFields in one go

4 years ago[REF] [Export] Move function that parses tokens to address processor
eileen [Thu, 11 Jul 2019 18:41:13 +0000 (06:41 +1200)]
[REF] [Export] Move function that parses tokens to address processor

4 years agoMinor consolidation of weird mergeSameAddreess nightmare code
eileen [Wed, 10 Jul 2019 12:44:02 +0000 (00:44 +1200)]
Minor consolidation of weird mergeSameAddreess nightmare code

4 years agoMerge pull request #14794 from colemanw/select2map
Eileen McNaughton [Thu, 11 Jul 2019 17:56:44 +0000 (05:56 +1200)]
Merge pull request #14794 from colemanw/select2map

Use select2 to display field mappings

4 years agoMerge pull request #14790 from eileenmcnaughton/post
colemanw [Thu, 11 Jul 2019 14:34:43 +0000 (10:34 -0400)]
Merge pull request #14790 from eileenmcnaughton/post

[REF] [EXPORT] cleanup setting of additional postal fields

4 years agoMerge pull request #14792 from eileenmcnaughton/ex_x
colemanw [Thu, 11 Jul 2019 14:31:03 +0000 (10:31 -0400)]
Merge pull request #14792 from eileenmcnaughton/ex_x

[REF] [EXPORT] [TLA] Update handling of input fields so that the mapping format is accepted.

4 years agoUse select2 to display field mappings
Coleman Watts [Thu, 11 Jul 2019 14:07:13 +0000 (10:07 -0400)]
Use select2 to display field mappings

4 years agoUpdate handling of input fields so that the mapping format is accepted.
eileen [Wed, 10 Jul 2019 08:25:02 +0000 (20:25 +1200)]
Update handling of input fields so that the mapping format is accepted.

At this point we are converting to the mapping format AFTEr the function receives the fields but
changing that is the next step

4 years agoMerge pull request #14787 from eileenmcnaughton/ex1
colemanw [Thu, 11 Jul 2019 02:06:01 +0000 (22:06 -0400)]
Merge pull request #14787 from eileenmcnaughton/ex1

[REF][Export] Minor cleanup on household merge properties

4 years agoEnsure recently converted groups cache matches previous behabiour my setting withArra...
Seamus Lee [Wed, 10 Jul 2019 22:19:18 +0000 (08:19 +1000)]
Ensure recently converted groups cache matches previous behabiour my setting withArray as fast for it

Add in code comment as per Eileen

4 years agodev/core#1093 add a bulkSave action for many customFields in one go
eileen [Thu, 4 Jul 2019 00:08:34 +0000 (12:08 +1200)]
dev/core#1093 add a bulkSave action for many customFields in one go

Add bulkCreate function for CustomField with a view towards this being a new protocol for how bulk create actions would look from a code POV which we could expose via apiv4

4 years agoMinor cleanup on household merge properties
eileen [Wed, 10 Jul 2019 01:28:50 +0000 (13:28 +1200)]
Minor cleanup on household merge properties

4 years ago[REF] cleanup setting of additional postal fields
eileen [Wed, 10 Jul 2019 02:20:21 +0000 (14:20 +1200)]
[REF] cleanup setting of additional postal fields

Further cleanup

4 years agoMerge pull request #14780 from eileenmcnaughton/export_test2
colemanw [Wed, 10 Jul 2019 23:49:48 +0000 (19:49 -0400)]
Merge pull request #14780 from eileenmcnaughton/export_test2

[NFC] [REF] [TEST] [EXPORT] Update various export tests to test csv output with new functions

4 years agoMerge pull request #14788 from eileenmcnaughton/ex2
colemanw [Wed, 10 Jul 2019 23:45:09 +0000 (19:45 -0400)]
Merge pull request #14788 from eileenmcnaughton/ex2

[REF] [EXPORT] partial cleanup on adding fields to returnProperties based on usage

4 years ago[REF] partial cleanup on adding fields to returnProperties based on usage
eileen [Wed, 10 Jul 2019 01:42:39 +0000 (13:42 +1200)]
[REF] partial cleanup on adding fields to returnProperties based on usage

4 years agoMerge pull request #14785 from colemanw/contactTypes
Eileen McNaughton [Wed, 10 Jul 2019 21:17:00 +0000 (09:17 +1200)]
Merge pull request #14785 from colemanw/contactTypes

[EXPORT] Minor fixes to the export form

4 years ago[NFC][REF][TEST] update im provider export test to use csv output
eileen [Wed, 10 Jul 2019 11:42:01 +0000 (23:42 +1200)]
[NFC][REF][TEST] update im provider export test to use csv output

The move from testing sqlColumns to csv output is deliberate. While refactoring, cleaning up the sqlColumns stuff
having test on it was VERY helpful. But, at the end of the day the csv IS the output and testing that allows
us to improve the mechanism to develop that output

4 years ago[NFC] [TEST] fix another test for output testing
eileen [Wed, 10 Jul 2019 10:44:58 +0000 (22:44 +1200)]
[NFC] [TEST] fix another test for output testing

4 years agoImprove another test to test csv output
eileen [Wed, 10 Jul 2019 09:46:11 +0000 (21:46 +1200)]
Improve another test to test csv output

Note we are implictly checking headers so no need to do so separately

4 years agoMerge pull request #14786 from civicrm/5.16
Eileen McNaughton [Wed, 10 Jul 2019 20:00:05 +0000 (08:00 +1200)]
Merge pull request #14786 from civicrm/5.16

5.16 to master

4 years agoRemove irrelevant relationship types from export options
Coleman Watts [Sun, 7 Jul 2019 02:05:06 +0000 (22:05 -0400)]
Remove irrelevant relationship types from export options

4 years agoUse function to get contactTypes instead of hardcoded list
Coleman Watts [Sun, 7 Jul 2019 01:12:26 +0000 (21:12 -0400)]
Use function to get contactTypes instead of hardcoded list

4 years agoMerge pull request #14783 from agh1/5.16.0-releasenotes
Eileen McNaughton [Wed, 10 Jul 2019 19:04:56 +0000 (07:04 +1200)]
Merge pull request #14783 from agh1/5.16.0-releasenotes

5.16.0 release notes first run

4 years agoMerge pull request #14773 from eileenmcnaughton/export
colemanw [Wed, 10 Jul 2019 18:23:20 +0000 (14:23 -0400)]
Merge pull request #14773 from eileenmcnaughton/export

 [REF] [export] remove chunk of non-functional code

4 years agoMerge pull request #14774 from eileenmcnaughton/export_again
colemanw [Wed, 10 Jul 2019 18:22:09 +0000 (14:22 -0400)]
Merge pull request #14774 from eileenmcnaughton/export_again

[REF] [export] Cleaner handling of additional return properties

4 years agoMerge pull request #14761 from eileenmcnaughton/unsub1
Seamus Lee [Wed, 10 Jul 2019 16:41:54 +0000 (12:41 -0400)]
Merge pull request #14761 from eileenmcnaughton/unsub1

dev/core#1108 Use api call to retrieve mailing_id

4 years ago5.16.0 release notes: include César Ramos
Andrew Hunt [Wed, 10 Jul 2019 16:26:04 +0000 (12:26 -0400)]
5.16.0 release notes: include César Ramos
per
https://github.com/civicrm/civicrm-core/pull/14518#issuecomment-501881835

4 years ago5.16.0 release notes: add boilerplate
Andrew Hunt [Wed, 10 Jul 2019 15:43:36 +0000 (11:43 -0400)]
5.16.0 release notes: add boilerplate

4 years ago5.16.0 release notes: raw from script
Andrew Hunt [Wed, 10 Jul 2019 15:48:47 +0000 (11:48 -0400)]
5.16.0 release notes: raw from script

4 years agoContributor key: fix invalid YAML
Andrew Hunt [Wed, 10 Jul 2019 15:34:49 +0000 (11:34 -0400)]
Contributor key: fix invalid YAML

4 years agoMerge pull request #14767 from eileenmcnaughton/export_2
colemanw [Wed, 10 Jul 2019 13:18:02 +0000 (09:18 -0400)]
Merge pull request #14767 from eileenmcnaughton/export_2

[REF] initial extraction of loading saved mapping to qf format

4 years agoMerge pull request #14769 from eileenmcnaughton/ex_test2
colemanw [Wed, 10 Jul 2019 13:16:34 +0000 (09:16 -0400)]
Merge pull request #14769 from eileenmcnaughton/ex_test2

[REF] simplify & add tests on getMappingParams

4 years agoMerge pull request #14781 from civicrm/5.16
Eileen McNaughton [Wed, 10 Jul 2019 12:11:09 +0000 (00:11 +1200)]
Merge pull request #14781 from civicrm/5.16

5.16 to master

4 years agoMerge pull request #14775 from eileenmcnaughton/bgm
Mathieu Lu [Wed, 10 Jul 2019 12:09:48 +0000 (08:09 -0400)]
Merge pull request #14775 from eileenmcnaughton/bgm

dev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv

4 years agoMerge pull request #14779 from eileenmcnaughton/export_test2
Matthew Wire [Wed, 10 Jul 2019 11:29:01 +0000 (12:29 +0100)]
Merge pull request #14779 from eileenmcnaughton/export_test2

[ref] [export] [test] Improve csv test to test final output rather than the csv

4 years agoMerge pull request #14750 from eileenmcnaughton/pay_notice
Monish Deb [Wed, 10 Jul 2019 09:12:05 +0000 (14:42 +0530)]
Merge pull request #14750 from eileenmcnaughton/pay_notice

Fix enotice on formatting credit card details

4 years agoImprove csv test to test final output rather than the csv
eileen [Wed, 10 Jul 2019 09:09:30 +0000 (21:09 +1200)]
Improve csv test to test final output rather than the csv

4 years agoMerge pull request #14770 from totten/master-config-ids
Eileen McNaughton [Wed, 10 Jul 2019 08:05:44 +0000 (20:05 +1200)]
Merge pull request #14770 from totten/master-config-ids

Finish removing references to Config.IDS.ini

4 years agoMerge pull request #14696 from totten/master-d8-url
Eileen McNaughton [Wed, 10 Jul 2019 08:01:34 +0000 (20:01 +1200)]
Merge pull request #14696 from totten/master-d8-url

Migrate CivicrmHelper::parseUrl() to CRM_Utils_System_Drupal8::parseUrl().

4 years agoMerge pull request #14777 from totten/master-clean-key
Eileen McNaughton [Wed, 10 Jul 2019 07:56:12 +0000 (19:56 +1200)]
Merge pull request #14777 from totten/master-clean-key

GenCode, Cache::cleanKey() - Fix deploop during clean initialization

4 years agoMerge pull request #14778 from totten/master-basefilepath
Eileen McNaughton [Wed, 10 Jul 2019 07:49:37 +0000 (19:49 +1200)]
Merge pull request #14778 from totten/master-basefilepath

(dev/cloud-native#3) CRM_Utils_File - Deprecate baseFilePath() et al

4 years agoCRM_Utils_File::relativeDirectory() - Mark as deprecated
Tim Otten [Wed, 10 Jul 2019 06:35:31 +0000 (23:35 -0700)]
CRM_Utils_File::relativeDirectory() - Mark as deprecated

Computation of a relative path requires some base.  This implementation is
problematic because it relies on an implicit base which was constructed
problematically.  Moreover, the function is not used anywhere in the known
`universe`.

4 years agoCRM_Utils_File::absoluteDirectory() - Make `$basePath` required
Tim Otten [Wed, 10 Jul 2019 06:32:10 +0000 (23:32 -0700)]
CRM_Utils_File::absoluteDirectory() - Make `$basePath` required

Previous versions interpreted `$basePath=NULL` to mean "default to `self::baseFilePath()`".
However, no code in the known `universe` relies on this interpretation, and
the `baseFilePath()` function is problematic/deprecated.

We could almost deprecate the entire function `absoluteDirectory()`;
however, it's fine to keep around: the semantics are reasonable if one
provides `$basePath`, and there is one active use-case in which
`Civi\Core\Paths` calls `absoluteDirectory()` with a suitable `$basePath`.

4 years agoCRM_Utils_File::baseFilePath() - Mark function as deprecated
Tim Otten [Wed, 10 Jul 2019 06:30:57 +0000 (23:30 -0700)]
CRM_Utils_File::baseFilePath() - Mark function as deprecated

The rationale is provided in the docblock.

4 years agoGenCode, Cache::cleanKey() - Fix deploop during clean initialization
Tim Otten [Wed, 10 Jul 2019 02:21:58 +0000 (19:21 -0700)]
GenCode, Cache::cleanKey() - Fix deploop during clean initialization

Overview
--------

Suppose you have a clean codebase with no DAO files, and you try to run `xml/GenCode.php`.
This currently crashes.

The problem is not symptomatic day-to-day because we commit DAOs, so it's
very rare to run a full/clean initialization.  However, it does get in the
way of stress-testing the correctness of GenCode.

Before
------

Since 76e697a9d750d568d0d12c10dd8173f656e8bb1e, I believe we've had a dependency-loop
in the clean-gencode scenario, which works as follows:

* We don't have any DAOs, so we run `GenCode`.
* Running `GenCode` does a partial bootstrap (i.e. `CRM_Core_Config::singleton($loadFromDB===FALSE)`)
* The partial bootstrap creates some thread-local caches (`Arraycache`)
* Before creating the cache, it normalizes the name by calling `CRM_Core_BAO_Cache::cleanKey()`
* `CRM_Core_BAO_Cache` extends `CRM_Core_DAO_Cache`
* `CRM_Core_BAO_Cache` doesn't exist - that's why we called `GenCode` at the beginning.

After
-----

This migrates the utility function `cleanKey()` to another class which is always available and
does not rely on DAOs.

4 years agodev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv
Mathieu Lutfy [Wed, 10 Jul 2019 00:07:16 +0000 (20:07 -0400)]
dev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv

4 years agoMerge pull request #14772 from mlutfy/drupal75
Eileen McNaughton [Wed, 10 Jul 2019 04:44:29 +0000 (16:44 +1200)]
Merge pull request #14772 from mlutfy/drupal75

dev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv

4 years agoCleaner handling of additional return properties
eileen [Wed, 10 Jul 2019 01:18:11 +0000 (13:18 +1200)]
Cleaner handling of additional return properties

4 years ago [REF] [export] remove chunk of non-functional code
eileen [Wed, 10 Jul 2019 00:24:35 +0000 (12:24 +1200)]
 [REF] [export] remove chunk of non-functional code

I worked through this & groups is only available as a return property from contact export so can only be hit from there.

However, the search string has a very specific format - involving parentheses - that is NOT present in the from
clause as currently calculated

      case 'civicrm_group_contact':
        return " $side JOIN civicrm_group_contact ON contact_a.id = civicrm_group_contact.contact_id ";

I don't kmow if there is some bug that if this worked it would fix or not but the original bug
it addressed referred to an old query format we don't use https://issues.civicrm.org/jira/browse/CRM-3618 now.

If there is a bug this won't change it & if we identify it we can add tests & fix properly

4 years agodev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv
Mathieu Lutfy [Wed, 10 Jul 2019 00:07:16 +0000 (20:07 -0400)]
dev/drupal#75 Drupal8: fix call to languageNegotiationURL() when called from cv

4 years agoMerge pull request #14768 from eileenmcnaughton/export_test
Eileen McNaughton [Wed, 10 Jul 2019 00:03:26 +0000 (12:03 +1200)]
Merge pull request #14768 from eileenmcnaughton/export_test

[REF] [export] . Move greeting params retrieval to the place in the code where it is used

4 years ago[REF] simplify & add tests on getMappingParams
eileen [Tue, 9 Jul 2019 22:26:38 +0000 (10:26 +1200)]
[REF] simplify & add tests on getMappingParams

Tests extended to cover search builder (all that operator stuff

4 years agoCRM-20926 - Finish killing Config.IDS.ini
Tim Otten [Tue, 9 Jul 2019 22:19:31 +0000 (15:19 -0700)]
CRM-20926 - Finish killing Config.IDS.ini

4 years agoMove greeting params retrieval to the place in the code where it is used
eileen [Tue, 9 Jul 2019 21:28:42 +0000 (09:28 +1200)]
Move greeting params retrieval to the place in the code where it is used

4 years agoMerge pull request #14765 from eileenmcnaughton/export_test
Eileen McNaughton [Tue, 9 Jul 2019 21:04:16 +0000 (09:04 +1200)]
Merge pull request #14765 from eileenmcnaughton/export_test

[REF] Update export test to new function

4 years ago[REF] initial extraction of loading saved mapping to qf format
eileen [Tue, 9 Jul 2019 20:48:44 +0000 (08:48 +1200)]
[REF] initial extraction of loading saved mapping to qf format

Janky but in the right direction. The phoneType & imProvider stuff looks nasty but not more nasty

4 years agoMerge pull request #14745 from eileenmcnaughton/fgb
Eileen McNaughton [Tue, 9 Jul 2019 19:47:16 +0000 (07:47 +1200)]
Merge pull request #14745 from eileenmcnaughton/fgb

dev/core#578 follow up fix on activity summary report

4 years agoMerge pull request #14615 from mattwire/contributionpage_title
Eileen McNaughton [Tue, 9 Jul 2019 19:46:39 +0000 (07:46 +1200)]
Merge pull request #14615 from mattwire/contributionpage_title

Set title using standard form method and use for success message on contributionpage

4 years agoMerge pull request #14762 from eileenmcnaughton/mapping_whomp
Matthew Wire [Tue, 9 Jul 2019 16:27:53 +0000 (17:27 +0100)]
Merge pull request #14762 from eileenmcnaughton/mapping_whomp

[REF] Extract mapping converter function, kinda brutally

4 years agoExtract mapping converter function, kinda brutally
eileen [Tue, 9 Jul 2019 08:23:38 +0000 (20:23 +1200)]
Extract mapping converter function, kinda brutally

4 years agoUpdate export test to new function
eileen [Tue, 9 Jul 2019 12:19:15 +0000 (00:19 +1200)]
Update export test to new function

4 years agoMerge pull request #14706 from ixiam/dev-SmartyCompiled
Eileen McNaughton [Tue, 9 Jul 2019 12:13:34 +0000 (00:13 +1200)]
Merge pull request #14706 from ixiam/dev-SmartyCompiled

expose smarty's compile_check to be overridden in civicrm.settings.php

4 years agoMerge pull request #14758 from eileenmcnaughton/export_test_improve
colemanw [Tue, 9 Jul 2019 12:05:07 +0000 (08:05 -0400)]
Merge pull request #14758 from eileenmcnaughton/export_test_improve

[REF] export code simplification

4 years agoDeprecated alterFieldSQL
eileen [Thu, 4 Jul 2019 00:08:14 +0000 (12:08 +1200)]
Deprecated alterFieldSQL

This function is only used by one place and feels like the wrong separation of concerns - ie
we have a single create action & a multiple create action. They both need to share the generation
of the sql to run but can handle the batching of that & rebuilding of triggers etc
separately

4 years agodev/core#1108 Use api call to retrieve mailing_id
eileen [Tue, 9 Jul 2019 06:39:50 +0000 (18:39 +1200)]
dev/core#1108 Use api call to retrieve mailing_id

This replaces several lines of code with one & avoids ad hoc handling on translation

4 years agoAdd unit test for saveFieldMapping
eileen [Tue, 9 Jul 2019 07:08:35 +0000 (19:08 +1200)]
Add unit test for saveFieldMapping

4 years agoMerge pull request #14757 from eileenmcnaughton/mapping_fields
Eileen McNaughton [Tue, 9 Jul 2019 08:27:55 +0000 (20:27 +1200)]
Merge pull request #14757 from eileenmcnaughton/mapping_fields

[REF] Extract saveMapping Field

4 years agoMerge pull request #14729 from eileenmcnaughton/enotice
Eileen McNaughton [Tue, 9 Jul 2019 08:08:18 +0000 (20:08 +1200)]
Merge pull request #14729 from eileenmcnaughton/enotice

e-notice fix & unit test

4 years agoRemove unecessary pass-by-reference
eileen [Tue, 9 Jul 2019 05:00:30 +0000 (17:00 +1200)]
Remove unecessary pass-by-reference

4 years ago[REF] export code simplification
eileen [Tue, 9 Jul 2019 04:43:26 +0000 (16:43 +1200)]
[REF] export code simplification

On review I find the value ['exportOption'] is a parameter used at the form later to determine whether to
export 'Primary fields only' (ahem) or the user should select an array of fields. By the time the form is submitted we
either have an array of selected fields or NULL denoting that there is no selection (& hence the defaults should be used)
and the selection at the form layer is redundant. However it is still being referenced in one place (and hence the tests
are passing it in to avoid an enotice). This fixes that one place & removes it from the tests. It also extracts part of
a test to move towards making it easier to alter the signature of exportComponents without messing with so many places in
the code

4 years agoMerge pull request #14756 from eileenmcnaughton/wrangle
Eileen McNaughton [Tue, 9 Jul 2019 03:57:09 +0000 (15:57 +1200)]
Merge pull request #14756 from eileenmcnaughton/wrangle

Extract field wrangling to determineReturnProperties

4 years agoExtract saveMapping Field
eileen [Tue, 9 Jul 2019 00:58:16 +0000 (12:58 +1200)]
Extract saveMapping Field

Basic extraction. Tangental to export mapping cleanup

4 years agoMerge pull request #14754 from eileenmcnaughton/cust_field_fix
colemanw [Tue, 9 Jul 2019 02:53:52 +0000 (22:53 -0400)]
Merge pull request #14754 from eileenmcnaughton/cust_field_fix

Fix obscure bug on updating custom fields (not necessarily hittable via UI)

4 years agoMerge pull request #14755 from eileenmcnaughton/mapping_sane
colemanw [Tue, 9 Jul 2019 02:51:37 +0000 (22:51 -0400)]
Merge pull request #14755 from eileenmcnaughton/mapping_sane

[REF] Remove call to getMappingFields in favour of api call.

4 years agoExtract field wrangling to determineReturnProperties
eileen [Mon, 8 Jul 2019 23:22:00 +0000 (11:22 +1200)]
Extract field wrangling to determineReturnProperties

This encases the wrangling of the field format to it's own function

4 years agoMerge pull request #14742 from eileenmcnaughton/payment_out
colemanw [Mon, 8 Jul 2019 23:51:34 +0000 (19:51 -0400)]
Merge pull request #14742 from eileenmcnaughton/payment_out

[REF] un-extract createProportionalFinancialEntities

4 years agoFix obscure bug on updating custom fields (not necessarily hittable via UI)
eileen [Mon, 8 Jul 2019 22:41:20 +0000 (10:41 +1200)]
Fix obscure bug on updating custom fields (not necessarily hittable via UI)

This fixes a bug which I think only applies to programatically created custom fields -basically if the field has an empty option_group_id
and then you update it to have one it does a check to see if the existing option_group_id is in use and does not handle the
fact the field is empty - leading to a mysql error.

4 years agoRemove call to getMappingFields in favour of api call.
eileen [Mon, 8 Jul 2019 23:08:18 +0000 (11:08 +1200)]
Remove call to getMappingFields in favour of api call.

The getMappingFields function is confusing - it turns out we just need an array of names