Details
-
Type: Bug
-
Status: Done/Fixed
-
Priority: Minor
-
Resolution: Fixed/Completed
-
Affects Version/s: 4.2.2
-
Fix Version/s: 4.3.0
-
Component/s: CiviReport
-
Labels:None
Description
PROBLEM: A number of summary report templates provide links to a detail report for "drilldown". However, the summary report user interface does not allow the user to specify which instance of a detail report should be linked to - and currently (as of 4.2.2) links to the instance with the lowest ID (CRM-10927). This does not work well when users have created many different instances of a given detail report - as the drilldown provides "unexpected" results.
SOLUTION: If there is more than one eligible drilldown instance, provide a dropdown and allow the user to select one. Dropdown will include an "empty" (- select - ) option which will results in the current default behavior (pick the instance with the lower instance ID).
Implementation
============
NOTE: Deepak - this is a draft implementation. Feel free to modify / simplify if you see a cleaner way to do this.
0. Add new column to report_instance table to store drilldown_id
1. Add a new property to report constructors allowing reports to define a "drilldown report_id". For example, CRM_Report_Form_Contribute_Summary would define this as 'contribute/detail'.
2. When a report instance of a report which has this property defined is loaded, check if there are > 1 report instances where report_instance.report_id = drilldown report_id. If so, include dropdown in Report Settings > Other Settings
"Link to Detail Report" [ - select - ]
Dropdown lists eligible report instance titles.
3. Update Report post process saves the drilldown instance id.
4. Modify getNextUrl method used in alterDisplay() to retrieve the specified drilldown instance id.
Attachments
Issue Links
- supplements
-
CRM-10927 In reports, linked reports going to highest id of report type specified
- Done/Fixed