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

Ensure all filters that accept numeric data also handle localised floats

XMLWordPrintable

    • MOODLE_404_STABLE
    • MOODLE_405_STABLE
    • Hide
      1. Log in as admin
      2. Navigate to Language > Language Packs in site administration
      3. Install German (de) language pack

      Filesize filter

      1. Navigate to Private files from user menu
      2. Upload file.txt and save changes
      3. Navigate to Reports from user menu
      4. Create new report from Files report source
        • Include default setup: Yes
      5. Open conditions, apply the following:
        • Files > Drafts: No
        • Files > Type: Text file
      6. Close the editor
      7. From reports list, choose the View report action for the report you created
      8. Open filters, apply the following:
        • Size: Less than 1.5 KB
      9. Confirm presence of previously uploaded file.txt
      10. Change language to German
      11. Open filters, apply the following:
        • Größe: Kleiner als 1,5 KB
      12. Confirm presence of previously uploaded file.txt
      13. Change language back to English

      Duration / number filter

      1. Ensure cron has run so that some tasks have been executed
      2. Navigate to Reports from user menu
      3. Create new report from Task logs report source
        • Include default setup: Yes
      4. Add the Task log > Database reads column to the report
      5. Add the following filters to the report:
        • Task log > Duration
        • Task log > Database reads
      6. Open the Sorting options:
        • Disable Start time
        • Enable Duration (descending)
        • Enable Database reads (descending)
      7. Close the editor
      8. From reports list, choose the View report action for the report you created
      9. Make a note of the first row in the report of the Duration and Database reads values, for example:
        • <DURATION> = 0.05 secs
        • <DATABASE READS> = 21
      10. Open filters, apply the following:
        • Duration: Greater than 0.04 seconds (e.g. go 0.01 lower than <DURATION>)
        • Database reads: Less than 21.5 (e.g. go 0.5 higher than <DATABASE READS>)
      11. Confirm the top row of the report is preserved and most other rows are filtered out
      12. Change language to German
      13. Open filters, apply the following:
        • Dauer: Größer als 0,04 Sekunden (e.g. go 0.01 lower than <DURATION>)
        • Lesezugriffe auf die Datenbank: Kleiner als 21,5 (e.g. go 0.5 higher than <DATABASE READS>)
      14. Confirm the top row of the report is preserved and most other rows are filtered out
      Show
      Log in as admin Navigate to Language > Language Packs in site administration Install German (de) language pack Filesize filter Navigate to Private files from user menu Upload file.txt and save changes Navigate to Reports from user menu Create new report from Files report source Include default setup: Yes Open conditions, apply the following: Files > Drafts: No Files > Type: Text file Close the editor From reports list, choose the View report action for the report you created Open filters, apply the following: Size: Less than 1.5 KB Confirm presence of previously uploaded file.txt Change language to German Open filters, apply the following: Größe: Kleiner als 1,5 KB Confirm presence of previously uploaded file.txt Change language back to English Duration / number filter Ensure cron has run so that some tasks have been executed Navigate to Reports from user menu Create new report from Task logs report source Include default setup: Yes Add the Task log > Database reads column to the report Add the following filters to the report: Task log > Duration Task log > Database reads Open the Sorting options: Disable Start time Enable Duration (descending) Enable Database reads (descending) Close the editor From reports list, choose the View report action for the report you created Make a note of the first row in the report of the Duration and Database reads values, for example: <DURATION> = 0.05 secs <DATABASE READS> = 21 Open filters, apply the following: Duration: Greater than 0.04 seconds (e.g. go 0.01 lower than <DURATION> ) Database reads: Less than 21.5 (e.g. go 0.5 higher than <DATABASE READS> ) Confirm the top row of the report is preserved and most other rows are filtered out Change language to German Open filters, apply the following: Dauer: Größer als 0,04 Sekunden (e.g. go 0.01 lower than <DURATION> ) Lesezugriffe auf die Datenbank: Kleiner als 21,5 (e.g. go 0.5 higher than <DATABASE READS> ) Confirm the top row of the report is preserved and most other rows are filtered out

      For better multi-language support, and to support more fine grained filtering of numeric data, ensure that we consistently support localised floats as filter input

      • Duration & filesize use PARAM_FLOAT (non-localised)
      • Number uses PARAM_INT (floats are silently truncated)
      • Date uses PARAM_INT (limitation of date/time formats)

        Note:

        number is an integer number; if a decimal number is given, the dot (or comma) is likely interpreted as delimiter. For instance, '+1.5 hours' is parsed like '+1 5 hours', not as '+1 hour +30 minutes'.

      It will be good to achieve consistency across all filters, but will also be especially helpful once MDL-75141 lands and we are more likely to have floats in aggregated values that we want to similarly filter (with user supplied floats)

            pholden Paul Holden
            pholden Paul Holden
            Mohamed Shehata Mohamed Shehata
            David Carrillo David Carrillo
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 3 hours, 50 minutes
                3h 50m

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