NOTE: This is a technical subticket of T328075: Move tracking out of donation data blob
This ticket is about changing how the analysis code queries the donation database - querying database for donations with matching campaign and keywords instead of iterating over donations and checking the tracking data in PHP.
Affected repositories
- Fundraising Operation Center
Implementation Details:
- Change the test code to automatically create the tracking entities before creating the donation entities (e.g. by reusing the same Tracking entities and assigning them to different donations). Don't remove the tracking info from the data blob yet (to avoid breaking the tests)
- Change DatabaseDonationReader:
- join the tracking table the query builder and query it with the given keywords and campaign.
- remove the if statement that checks for a $trackingData match
- create the Tracking object from the $row result instead of unserializing data
- Remove the embedding of the tracking data (calls to encodeAndSetData) from the test code
The changes might break AnalysisTest. If that happens, you'll have to investigate if the data migration in T338509: Adapt donation fixtures for tests was not done properly or if there is another underlying cause.