Commit Graph

63 Commits

Author SHA1 Message Date
Rodrigo Primo
5c6000bed6 Fix: duplicated entries when exporting subscribers of dynamic segments
This commit fixes a bug in the code that exports subscribers to a CSV
file. This bug caused duplicated entries when exporting subscribers of
dynamic segments. Instead of a given subscriber appearing only once in the
CSV file, they would be included multiple times, and the number of times
would depend on the number of static segments that they had subscribed to.

This bug was caused by a problem in the code that generates the SQL
query used to fetch the subscribers that will be exported. The same
method is used for subscribers not linked to a segment, static
segments, and dynamic segments. The table wp_mailpoet_segments was
included in the query in the three cases, but it should not be included
for dynamic segments as this type of segment does not have a
corresponding entry in this table. Including this table without
specifying a segment ID (as there is not one for dynamic segments),
meant that MySQL would return an extra entry for a given subscriber for
each static segment that they had subscribed to.

[MAILPOET-3900]
2021-11-22 14:33:58 +01:00
Brezo Cordero
3cf95c7feb Attempt to convert dates using d/m/Y
[MAILPOET-3747]
2021-11-16 11:06:52 +01:00
oluwaseun Olorunsola
95f7e427f9 Use __ without using the WPFunctions wrapper
MAILPOET-3852
2021-11-03 13:35:18 +01:00
oluwaseun Olorunsola
1cdbf31b50 Include list column for excel subscribers export
MAILPOET-3852
2021-11-03 13:35:18 +01:00
Jan Lysý
6e6ba3e7a1 Use new signature of the dynamicSegmentFilterData constructor
[MAILPOET-3427]
2021-10-27 15:45:17 +02:00
Rodrigo Primo
fb5ff0b90a Replace Paris code with Doctrine equivalents for exporter tests
[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Rodrigo Primo
8b7815caf8 Use Doctrine for the opens and clicks exporters
This commit refactors the code that handles exporting e-mails opens and
clicks when generating the personal data file to use Doctrine instead of
Paris. I opted to do this in this task as opens and clicks code share
some functionality, and I didn't want to add more code that relies on
Paris, as we are eventually going to remove it.

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Rodrigo Primo
780ac5e53c Add email opens data when exporting personal data
This commit adds stats about email opens data to the personal data
exported by WP.

To do this, I refactored the code that adds email clicks stats to use
base abstract class with functionality that is shared between both
exporters.

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Rodrigo Primo
4fdcee1064 Add the new user agent field when exporting data about clicks
This commit includes information about the user agent used when clicking
links in e-mails to the data that MailPoet exports when the WP tool
"Export Personal Data" is used.

When information about the user agent is not available, the string
'Unknown' is displayed instead.

This information is available under the section "MailPoet Emails
Clicks".

[MAILPOET-3738]
2021-08-25 17:01:33 +02:00
Brezo Cordero
44932d27c9 Allow import subscribers with empty IP address
Allow import subscribers with empty confirmed_ip or subscribed_ip when one of the columns is selected in the last step of the import.
Don't allow importing invalid IP addresses - still import the subscriber but remove the invalid IP address.

[MAILPOET-3665]
2021-08-16 10:37:31 +02:00
Jan Lysý
9f9706e319 Clear cache in failing integration tests
[MAILPOET-3646]
2021-07-12 11:51:39 +02:00
Jan Lysý
f106d6f2f2 Fix dependencies in integration tests
[MAILPOET-3269]
2021-06-14 10:12:34 +02:00
Rostislav Wolny
aff4c9d5b7 Fix dynamic segments filtering in subscriber export
[MAILPOET-3177]
2021-03-10 15:20:32 +01:00
wxa
e71e063ef0 Use same query logic for counting and exporting subs w/o lists
[MAILPOET-3462]
2021-03-10 13:16:48 +01:00
Rostislav Wolny
6f42222abc Fix subscriber consent data in export
[MAILPOET-3472]
2021-03-09 13:13:55 +01:00
Jan Lysý
62bf43ad3f Add consent evidence columns to import tests
[MAILPOET-3389]
2021-03-08 11:39:44 +01:00
Jan Lysý
a3224e9286 Remove old unused class for read subscribers
[MAILPOET-3376]
2021-03-08 09:09:00 +01:00
Jan Lysý
8450beaf10 Add tests for get subscribers in ImportExportRepository
[MAILPOET-3376]
2021-03-08 09:09:00 +01:00
Jan Lysý
4a2af719db Remove use old model from ExportTest
[MAILPOET-3376]
2021-03-08 09:09:00 +01:00
Jan Lysý
cbea75927a Add ignoring improper subscribers from MailChimp
[MAILPOET-3404]
2021-03-02 14:29:27 +01:00
Rostislav Wolny
ff284cb12f Fix flaky Import test
Comparing timestamps with delta parameter allow values that differs by 1 second.
[MAILPOET-3412]
2021-03-01 08:43:45 +01:00
Jan Lysý
2bf5e93125 Add integration test for ImportExportRepository
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Jan Lysý
0347e44893 Use importExportRepository in import
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Jan Lysý
d500f872d7 Refactor integration Import test
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Jan Lysý
1deaef4321 Use Doctrine in integration test for Import
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Jan Lysý
2f1899d810 Add new dependencies to ImportTest
[MAILPOET-3378]
2021-02-18 10:13:44 +01:00
Rostislav Wolny
cd578e6475 Refactor fetching list of subscribers for export
[MAILPOET-3146]
2021-01-25 09:17:17 +01:00
Jan Lysý
922c52f7df Remove phpstan errors from the rest of the tests
[MAILPOET-3235]
2021-01-18 14:39:42 +01:00
Rostislav Wolny
d91c383e53 Fix importing WP users as subscribers
[MAILPOET-3298]
2020-11-16 13:25:56 +01:00
Ján Mikláš
4045fba527 Remove unnecessary duplicated 'text' property
[MAILPOET-3073]
2020-10-29 14:09:37 +01:00
Ján Mikláš
ca04b600a3 Fix tests
[MAILPOET-3073]
2020-10-29 14:09:37 +01:00
Rostislav Wolny
54727ad9a2 Fix integration tests to work with updated codeception/verify
[MAILPOET-3203]
2020-10-20 13:18:43 +02:00
Rostislav Wolny
814686e8d2 Refactor mailpoet_get_segment_filters to direct calls
[MAILPOET-3077]
2020-09-28 14:26:53 +02:00
Lysy Jan
be4fb96dc5 Add tests to import for new properties
Fixes:#2968
[MAILPOET-2957]
2020-08-10 15:16:31 +02:00
Pavel Dohnal
a873f9846c Move the MailChimp test to integration suite
[MAILPOET-2843]
2020-04-16 12:57:34 +02:00
Jan Jakeš
b39dac75d6 Autofix number of newlines between methods
[MAILPOET-2715]
2020-02-19 19:12:53 +00:00
Jan Jakeš
94afd66325 Convert properties not caught by Code Sniffer to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Jan Jakeš
8c848cfa28 Convert property names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
Jan Jakeš
54549ff037 Convert variable names to camel case
[MAILPOET-1796]
2020-01-14 15:22:42 +01:00
wxa
bd1a84c5c3 Fix types by casting [MAILPOET-2488] 2019-12-30 14:51:22 +01:00
wxa
1d757e1374 Fix undefined properties in tests [MAILPOET-2488] 2019-12-30 14:51:22 +01:00
Amine Ben hammou
43df66d162 Add public keyword to methods
[MAILPOET-2413]
2019-12-26 18:09:45 +03:00
Jan Jakeš
60889c53f4 Add Idiorm to MailPoetVendor namespace
[MAILPOET-2545]
2019-11-27 12:38:20 +00:00
Jan Jakeš
ade1cc4d8e Autofix alphabetically sorted use statements
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00
Jan Jakeš
1b5b9d89ff Autofix namespace declaration spacing
[MAILPOET-2409]
2019-10-01 14:29:30 +01:00
Rostislav Wolny
d6d9885a1e Add link_token for new subscribers during import
[MAILPOET-2364]
2019-09-17 17:47:57 +02:00
Amine Ben hammou
1eecd65b3e Add unsubscribe token to new subscribers and newsletters 2019-07-31 16:50:44 -04:00
Rostislav Wolny
0b40475e7a Set last_subscribed_at within subscribers import
[MAILPOET-1993]
2019-07-23 09:57:46 -04:00
Pavel Dohnal
12ff88ee21 Add rule for operator spacing
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00
Pavel Dohnal
5da7110eb6 Use short array syntax
[MAILPOET-2090]
2019-05-20 10:18:45 -04:00