Case Activities Report includes core activities *always*
After creating an alternate timeline in CiviCRM, I selected the Print Report option from the view case screen. The timeline of activities includes all core activities, even those these are not in the timeline.
There is a hard coded call in the report to include all core activities, rather than filter based on some of the parameters present in the report i.e. all=1 or show all core activities
CRM/Case/XMLProcessor/Report.php
public function getActivities($clientID, $caseID, $activityTypes, &$activities) {
// get all activities for this case that in this activityTypes set
foreach ($activityTypes as $aType) {
$map[$aType['id']] = $aType;
}
// get all core activities
$coreActivityTypes = CRM_Case_PseudoConstant::caseActivityType(FALSE, TRUE);
foreach ($coreActivityTypes as $aType) {
$map[$aType['id']] = $aType;
}
I thought we should have a discussion about the functionality and why it is hard coded to include core activities on reports. Ideally if you are printing just a timeline that the user has specified by the GUI, it shouldn't show activities they haven't selected - Or it defeats the point of defining a timeline and printing it.
To print a report with a different timeline, simply append the timeline name. For testing: These appear to be sequence based, rather than name/label based.
https://site/wp-admin/admin.php?page=CiviCRM&q=civicrm%2Fcase%2Freport%2Fprint&redact=0&cid=12&caseID=62&asn=timeline_1 (Timeline 1 is the first time line after the standard timeline).