Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-75191

Create "Task logs" custom report source

XMLWordPrintable

    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Hide

      Setup

      1. Ensure cron has run (over a time period) to populate the task logs table, the more data we have the better

      Create report

      1. Log in as admin
      2. Navigate to Reports in user menu
      3. Create new report from Task logs report source
        • Include default setup
      4. Confirm report contains name, start time, duration and result columns
      5. Open Conditions
      6. Confirm report contains type, start time and result conditions
      7. Confirm type condition is set to Is equal to: Scheduled
      8. Add some columns to the report (End time, Database, etc), confirm their values are correct
      9. Close editor

      Average/sum aggregation

      1. Create new report from Task logs report source
        • Do not include default setup
      2. Add the following columns:
        • Task log > Name
        • Task log > Duration
        • Task log > Duration (again)
      3. Change aggregation for first Duration column to Average
      4. Change aggregation for second Duration column to Sum
      5. Confirm each aggregated column value shows unit of time correctly
      6. Open Sorting options
      7. Sort by the two Duration columns, ascending and descending
      8. Confirm the report is sorted appropriately
      Show
      Setup Ensure cron has run (over a time period) to populate the task logs table, the more data we have the better Create report Log in as admin Navigate to Reports in user menu Create new report from Task logs report source Include default setup Confirm report contains name, start time, duration and result columns Open Conditions Confirm report contains type, start time and result conditions Confirm type condition is set to Is equal to: Scheduled Add some columns to the report ( End time , Database , etc), confirm their values are correct Close editor Average/sum aggregation Create new report from Task logs report source Do not include default setup Add the following columns: Task log > Name Task log > Duration Task log > Duration (again) Change aggregation for first Duration column to Average Change aggregation for second Duration column to Sum Confirm each aggregated column value shows unit of time correctly Open Sorting options Sort by the two Duration columns, ascending and descending Confirm the report is sorted appropriately

      We have a task logs system report and entity (MDL-71153). Expose that data as a custom report source - add any missing column/filter elements as appropriate

      Columns

      1. Task log
        • Name
        • Plugin
        • Type
        • Start time
        • End time
        • Duration
        • Host name
        • PID
        • Database
        • Database reads
        • Database writes
        • Result
      2. User
        • <everything from user entity>

      Conditions/filters

      1. Task log
        • Name
        • Plugin
        • Type
        • Task output
        • Result
        • Start time
        • End time
        • Duration
        • Database reads
        • Database writes
      2. User
        • <everything from user entity>

      Directly related to this report source, it's noticeable that the sum and average aggregation types should be improved to execute column callbacks, so we should fix that here too

      Before:

      After:

      Also noticed MDL-75185 while working on this

            pholden Paul Holden
            pholden Paul Holden
            David Carrillo David Carrillo
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            John Edward Pedregosa John Edward Pedregosa
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 day, 14 minutes
                1d 14m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.