This will avoid them having to calculate what past segments and statuses would have been at the end of each quarter. Will need to investigate the feasibility of backfilling from the log tables as well, as Analytics currently calculates these back 6 years.
We'll store a unique id, the log_date, the contact id and the updated values for all segments and statuses and, for convenience, a bitfield indicating which fields have changed for each row (0001 indicates the first field changed, 0010 the second field and so on).
Description
Details
Related Objects
Event Timeline
Still to do: Display the latest segment change and change date from this table on the contact summary.
Change #1307869 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/crm@master] Add special log table for previous segments & statuses for Analytics
Change #1307869 merged by Eileen:
[wikimedia/fundraising/crm@master] Add special log table for previous segments & statuses for Analytics
Change #1308231 had a related patch set uploaded (by Eileen; author: Eileen):
[wikimedia/fundraising/crm@master] Add tab for DonorHistory
Change #1308241 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/crm@master] Test fix for donor segment / status history
Change #1308241 merged by Eileen:
[wikimedia/fundraising/crm@master] Test fix for donor segment / status history
Change #1309289 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/tools@master] Add previous segment & change date to Acoustic export
Change #1309312 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/tools@master] Ensure years_consecutive is 0 if no value
Change #1309289 merged by jenkins-bot:
[wikimedia/fundraising/tools@master] Add previous segment & change date to Acoustic export
Change #1309312 merged by jenkins-bot:
[wikimedia/fundraising/tools@master] Ensure years_consecutive is 0 if no value
Change #1315065 had a related patch set uploaded (by Lars SG; author: Lars SG):
[wikimedia/fundraising/crm@master] Switch Donor History table to order by log id as multiple changes at the same timestamp can be confusing otherwise
Change #1315065 merged by jenkins-bot:
[wikimedia/fundraising/crm@master] Switch Donor History table to order by log id as multiple changes at the same timestamp can be confusing otherwise