Skip to content
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

Export - add tests out header output, move phone_type_id to metadata #12587

Merged
merged 2 commits into from
Aug 1, 2018

Conversation

eileenmcnaughton
Copy link
Contributor

Overview

Add lots of tests to export. Use metadata for phone_type_id

Before

Header output not tested

After

Header output tested.

Phone Type ID column is with the other phone fields. As a side effect the definition is now only varchar(16). I think this is no worse than all the other fields with the 16 limit & changing this field should be OK. But there is a separate issue open to look at a higher varchar number for all columns in the output https://lab.civicrm.org/dev/core/issues/181

Technical Details

Support export of phone_type_id by marking the field as exportable. It would be nice to clean up campaign_id fields & im_provider but the latter requires a bit more untangling and the former requires a title change on the field (from 'Campaign' to 'Campaign ID') - this is not dissimilar to changes made in other places & should better support search builder but I have left it out of scope for now

Comments

@civibot
Copy link

civibot bot commented Jul 28, 2018

(Standard links)

@seamuslee001
Copy link
Contributor

Jenkins re test this please

@seamuslee001
Copy link
Contributor

@eileenmcnaughton i think this needs a rebase now

This has the side effect of making it such that it only gets 16 char rather than 255. I thnk this is 'ok' here but there is a separate issue open to increase the varchar for all fields on export
@@ -1756,6 +2063,7 @@ protected function getBasicSqlColumnDefinition($isContactExport) {
'country' => 'country varchar(64)',
'phone' => 'phone varchar(32)',
'phone_ext' => 'phone_ext varchar(16)',
'phone_type_id' => 'phone_type_id varchar(16)',
Copy link
Contributor

Choose a reason for hiding this comment

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

@eileenmcnaughton is the change here because it is now able to use the field definition and not fall back to a default length of 255?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@seamuslee001 yep - it's an unintended consequence but one which I think is OK since many other fields are given 16 char. I want to look at that side of things more once I get to the end of the cleanup

@eileenmcnaughton
Copy link
Contributor Author

@seamuslee001 is this good to merge?

@colemanw
Copy link
Member

colemanw commented Aug 1, 2018

Yay lots of tests!

@colemanw colemanw merged commit c8ef297 into civicrm:master Aug 1, 2018
@eileenmcnaughton eileenmcnaughton deleted the header_test branch August 1, 2018 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants