Uploaded image for project: 'CiviCRM'
  1. CiviCRM
  2. CRM-4773

Integrate report instances with navigation menu and add Reports menu to default navigation set

    Details

    • Type: Task
    • Status: Done/Fixed
    • Priority: Major
    • Resolution: Fixed/Completed
    • Affects Version/s: 3.0
    • Fix Version/s: 3.0
    • Component/s: CiviReport
    • Labels:
      None

      Description

      Summary
      ========
      1. Users who are creating or updating report instances need an easy way to inject them in the navigation
      menu.

      2. The sample report instances should be delivered with new installations - and available from a new top-level Reports menu.

      Implementation
      ============
      1.1 Add a new <select> field to the Create Report / Update Report fieldset (e.g. this field can be accessed when creating a report instance from a template, and when a permissioned user (access Report Criteria) accesses a report instance.

      Field Label: "Parent Menu"
      Select field with same option values as parent_id field in CRM_Admin_Form_Navigation (see CRM_Core_BAO_Navigation::getNavigationList in buildQuickForm() ).
      Field is NOT required

      Place this field in the "Other Settings" section, ABOVE the Permissions field. Include the same help content for the field (.hlp file) as used in Navigation (New Menu).

      1.2 Post Process - If a parent menu item is selected, then insert or update civicrm_navigation record.
      navigation.label = report_instance.title
      navigation.permission = report_instance.permission
      navigation.url = relative url for this instance
      navigation.parent_id = from new form field
      navigation.weight = use same rule as "new menu" insert

      I think there's a menu rebuild / reload function you'll also need to call in post process so new menu item shows up after saving.

      ISSUE: When in Update Report mode, what's the linkage between the report instance and the associated navigation menu? Please discuss with Kurund or Deepak. We might need to add a navigation_id column OR a constructed report_instance.name to provide linkage.

      2.1 Add "Reports" top-level menu to Navigation just above (to left of) Administer menu.
      Under "Reports"
      1. Report Listing
      2. Create Reports from Templates (only showing for those who have permission)
      3. After a separator, all the report instances that the user has permission for
      (Make sure these inserts are also handled in 2.2 -> 3.0 upgrade).

      2.2 Insert sample report instances (civicrm_report_instance) for new installs and upgrades (with linkage to menu items - depending on solution to ISSUE: above).

        Attachments

          Activity

            People

            • Assignee:
              rajan Rajan P Mayekar
              Reporter:
              dgg David Greenberg
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: