Symptom
The Wealth Engine total years giving calculation returns a 0 value.
WealthEngineInfo.totalYearsGiving
Millennium does pass what I would think is total years giving, always passed as 0. We do not calculate it.
WealthEngineInfo.totalNumberGiving = 0;
WealthEngineInfo.totalNumberGivingSpecified = false;
The WealthEngineInfo.totalYearsGiving comes from this select and additional logic, works like consecutive year in totals utility.
SELECT gifteffdat
FROM (
SELECT gifteffdat
FROM gifts
WHERE giftid = 'xxxxxxxxxx' and (gifttype = 'p' or gifttype = 'e' or gifttype = 'sp')
UNION
SELECT gifteffdat
FROM gifts
WHERE giftid = 'xxxxxxxxxx' and gifttype = 'g')
AS temp
ORDER BY gifteffdat ASC
**If the current year is greater than or equal to year from the select above then current year – year retrieved otherwise set to 0.
gifteffdat
2011-12-20 00:00:00.000
2014-03-10 00:00:00.000
2014-10-30 00:00:00.000
2014-12-02 00:00:00.000
2014-12-11 00:00:00.000
2016-02-02 00:00:00.000
2016-02-26 00:00:00.000
2017-01-27 00:00:00.000