CRM-17144 Add developer tab to CiviReport

    Details

    • Type: Bug
    • Status: Done/Fixed
    • Priority: Trivial
    • Resolution: Fixed/Completed
    • Affects Version/s: 4.6.8
    • Fix Version/s: 4.7
    • Component/s: None
    • Documentation Required?:
      Developer Doc
    • Funding Source:
      Contributed Code

      Description

      I've been getting some demand to add the developer tab from civicrm extended reports to core. It's a small change that just adds a tab to the report if you have the 'access developer tab in CiviCRM reports' permission that shows the SQL

        Attachments

        1. dev-2.jpg
          67 kB
          Eileen McNaughton
        2. developer.jpg
          85 kB
          Eileen McNaughton

          Activity

          [CRM-17144] Add developer tab to CiviReport
          David Greenberg added a comment -

          Eileen McNaughton The issue says 'fix for' = 4.6.9, but the PR is for 'master' (4.7). Can we keep it as 4.7 since it's not a critical fix etc.?

          Eileen McNaughton added a comment -

          yes - 4.7 is fine. I might backport to 4.6 later since it is a big bonus when debugging problems but will change to 4.7 at this stage

          David Greenberg added a comment -

          Eileen McNaughton I applied the PR to local 'master' checkout.

          • permission title is "CiviCRM: view report sql" (was expecting "access developer tab in CiviCRM reports" as noted in issue description) ?? I guess either is fine, but not sure what you intended. Also shouldn't the permission be under CiviReport - e.g. "CiviReport: view report sql"
          • I'm actually not seeing the Developer tab on any of the core reports I tested out (after assigning permission to my admin user, menu/rebuild, logout / login. Is it only being called for the extended reports, or am I missing a step? Seems like it should be available for any report.
          Eileen McNaughton added a comment -

          I changed the permission when I did the PR as it seemed to make more sense - I'll have to re-look at where the permission is in the list.

          The dev tab should show AFTER the report has been rendered - as it is generated after buildQuery is called. So, clicking preview report might make it show

          David Greenberg added a comment -

          I did click Preview Report (several times). No tab showing. Did you test this PR against a current master checkout? If so, any ideas on what to look at?

          Eileen McNaughton added a comment -

          I've moved the function call to buildQuery so it will not be so subject to reports overriding it. I was a little reluctant to put it there as most of the reports that override postProcess probably shouldn't - however, I have done it.

          I rebased the PR into one commit

          David Greenberg added a comment -

          Eileen McNaughton Assign back to me when ready for QA.

          David Greenberg added a comment -

          Thanks Eileen McNaughton Now that it's working for me ... I can see how really COOL this is!

            People

            • Assignee:
              David Greenberg
              Reporter:
              Eileen McNaughton

              Dates

              • Created:
                Updated:
                Resolved: