progressivetech / net.ourpowerbase.sumfields

The Summary Fields extension creates read-only custom data fields that extend Contact and are automatically populated with up-to-date totals such as total lifetime contributions, last contribution amount, last attended event, etc.
Other
8 stars 29 forks source link

export of datetime fields different, cutting off date #76

Closed Stoob closed 4 years ago

Stoob commented 4 years ago

@jmcclelland I'm running into a very interesting issue exporting summary field datetimes. Our stage and production site both use extension version 4.0.2 on Civi 5.26.2. The date time settings in Civi are identical. I have noticed that the schema are slightly different in MySQL on our servers, the name of the table, for example contains a plural s.

The time portion of the data is omitted from export. In both of the attached csv they have never been opened by Excel. One comes from production and one from stage. Yet in one of them the timestamp portion is missing.

There are no extension settings or Civi settings I can find that affect formatting of exporting the datetime fields.

Have you ever seen anything like this before and have any insight to offer?

stage prod schema.sql.txt

Stoob commented 4 years ago

Hi @jmcclelland just wondering if you saw this...

jmcclelland commented 4 years ago

Hi @Stoob - sorry for the delay, I'm a bit behind in my attention to extension issues and I did miss this one.

When you say you checked all the date/time settings I trust you mean you checked both the settings in the custom fields themselves as well as in the CiviCRM localization section.

Otherwise, a dramatic option would be to disable and uninstall the extension on both sites and then re-enable and re-configure. As long as you get a screen shot of the settings, you will get all your data back. The only downside is if any of these fields are used in smart groups, you will have to re-build those smart groups.

Stoob commented 4 years ago

Wow. That solved the issue. Thanks!

@jmcclelland mea culpa I did not even know that Summary Fields showed up alongside all the other ordinary Custom Fields. Has this always been this way or is it a feature of the new version?

jmcclelland commented 4 years ago

Oh good! Glad that worked. Yes, it's always been that way. It's both a feature and bane since having your extension create custom fields makes for an extension life-cycle headache if something goes wrong when un-installing and the fields get left behind. But otherwise, it seems to work ok.