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

Custom report helper methods should make tags property optional

XMLWordPrintable

    • WP Sprint 2024-I1.4 (Clones)

      This is a regression from MDL-80245 and was caught by failures in Workplace CI testing (WP-4747):

      1)tool_organisation\tool_reportbuilder\audiences\job_test::test_convert_to_core_reportbuilder_config with data set "Department" (array(1, 0), array(2, 3))
       
      Undefined property: stdClass::$tags
       
      /builds/workplace/moodle/reportbuilder/classes/local/helpers/report.php:67
      /builds/workplace/moodle/admin/tool/reportbuilder/classes/datasource.php:225
      /builds/workplace/moodle/admin/tool/organisation/tests/tool_reportbuilder/audiences/job_test.php:146
      /builds/workplace/moodle/lib/phpunit/classes/advanced_testcase.php:69
      

      We need to make sure that the ->tags property is optional in both the [create|update]_report(...) methods: https://github.com/moodle/moodle/commit/a1f064339db0be5404bf2d368853d2cdf51d1ba9#diff-c754fd2da0de12c0c4e020279129292e5d7c1ed409f9c450382cb721a02a633aR65-R92

      Subsequently we should assert this behaviour in the accompanying unit tests: https://github.com/moodle/moodle/commit/a1f064339db0be5404bf2d368853d2cdf51d1ba9#diff-9feeef5707ede8dcaaa0dde76adb3a15d158ff33129f0fe7ff62c52f0890af84R40-R81

      Setting as must fix as the regression was a 4.4 only change (and causes our tests to fail )

            carlos.castillo@moodle.com Carlos Castillo
            pholden Paul Holden
            David Cerezal David Cerezal
            Paul Holden Paul Holden
            CiBoT CiBoT
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

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