initial version including backported report from https://issues.civicrm.org/jira/browse/CRM-15453