Page MenuHomePhabricator

LYBUNT report load issue
Closed, ResolvedPublic4 Estimated Story Points

Description

The LYBUNT: MG CY2018 report in Civi doesn't seem to load. We use this report to review for outreach at year-end.

report/instance/125?reset=1&output=criteria

Query provided by @Eileenmcnaughton:

CREATE TEMPORARY TABLE civicrm_tmp_e_rptlybunt_20181107_5be2016904034 DEFAULT CHARACTER SET utf8 COLLATE utf8_unicode_ci

SELECT SQL_CALC_FOUND_ROWS contact_civireport.id as cid  FROM civicrm_tmp_e_rptgrp_20181107_5be20168ee838 group_temp_table INNER JOIN civicrm_contact contact_civireport
  ON group_temp_table.id = contact_civireport.id    INNER JOIN civicrm_contribution contribution_civireport  ON contribution_civireport.contact_id = contact_civireport.id
   AND contribution_civireport.is_test = 0
   AND contribution_civireport.receive_date BETWEEN '20170101000000' AND '20171231235959'
 

 LEFT JOIN civicrm_contribution cont_exclude ON cont_exclude.contact_id = contact_civireport.id
   AND cont_exclude.receive_date BETWEEN '2018-01-01' AND '20181231235959' WHERE cont_exclude.id IS NULL AND 1 AND 1
GROUP BY contact_civireport.id

Event Timeline

I'm still not able to make this report work. @LeanneS does it work for you?

@CaitVirtue it was pulled into the sprint today so I don't expect it to work yet - but will start on it now (since I was just deciding what to work on next)

Hmm - so it seems to work for other years not this year. Bug is probably that we have accepted too many donations - we should stop that :-)

Well more seriously - this isn't a regression per se - we just outgrew what used to work. I've done some analysis here https://lab.civicrm.org/dev/core/issues/518 and I think I can make the query much more efficient. I wrote a bunch of unit tests & did some code cleanup on this report a couple of years back so that will help now

Change 473322 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] Lybunt report - improve developer support for debugging this report

https://gerrit.wikimedia.org/r/473322

Change 473623 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] dev/core#518 Fix lybunt performance

https://gerrit.wikimedia.org/r/473623

Change 473654 had a related patch set uploaded (by Eileen; owner: Eileen):
[wikimedia/fundraising/crm/civicrm@master] Lybunt Clarify Row count reporting on calculated rows

https://gerrit.wikimedia.org/r/473654

Change 473322 merged by jenkins-bot:
[wikimedia/fundraising/crm/civicrm@master] Lybunt report - improve developer support for debugging this report

https://gerrit.wikimedia.org/r/473322

Change 473623 merged by jenkins-bot:
[wikimedia/fundraising/crm/civicrm@master] dev/core#518 Fix lybunt performance

https://gerrit.wikimedia.org/r/473623

@CaitVirtue @LeanneS I just pushed a fix - give the Lybunt another go

@CaitVirtue yay - it should be faster than it was last year too :-)

Change 473654 abandoned by Eileen:
Lybunt Clarify Row count reporting on calculated rows

Reason:
let's leave this until it comes through from core

https://gerrit.wikimedia.org/r/473654