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

Not possible to search for '0' in database activity module

XMLWordPrintable

    • MOODLE_404_STABLE, MOODLE_405_STABLE
    • master-MDL-58243
    • Hide
      1. create a database activity module instance
      2. create a field for each core field type that allows any user input
        1. Text
        2. Number
        3. Checkbox (options: '0' and 'foo')
        4. Latlong
        5. Menu (options: '0' and 'foo')
        6. Multimenu (options: '0' and 'foo')
        7. Radio button (options: '0' and 'foo')
        8. Textarea
      3. create an entry and set or select the value '0' for each field
      4. create another entry and set or select 'foo' as the value for each field
      5. for each field use the search to try find the entry with value '0'
      6. EXPECTED: find only the searched entry when searching for '0'
        ACTUALLY: the search parameter is ignored and all entries are shown
      7. apply the patch and test the search again (step 5)
        EXPECTED: find only the searched entry when searching for '0'
      Show
      create a database activity module instance create a field for each core field type that allows any user input Text Number Checkbox (options: '0' and 'foo') Latlong Menu (options: '0' and 'foo') Multimenu (options: '0' and 'foo') Radio button (options: '0' and 'foo') Textarea create an entry and set or select the value '0' for each field create another entry and set or select 'foo' as the value for each field for each field use the search to try find the entry with value '0' EXPECTED: find only the searched entry when searching for '0' ACTUALLY: the search parameter is ignored and all entries are shown apply the patch and test the search again (step 5) EXPECTED: find only the searched entry when searching for '0'
    • Hide

      Fails against automated checks.

      Checked MDL-84915 using repository: https://github.com/jojoob/moodle.git

      Should these errors be fixed?

      Built on: Wed Mar 19 17:18:01 UTC 2025

      Show
      Fails against automated checks. Checked MDL-84915 using repository: https://github.com/jojoob/moodle.git main [branch: master-MDL-58243 | CI Job ] Error: The master- MDL-58243 branch at https://github.com/jojoob/moodle.git is very old (>60 days ago). Please rebase against current main. Should these errors be fixed? Built on: Wed Mar 19 17:18:01 UTC 2025

      This was reported before, but was closed due to it being old (MDL-58243)

      Replication Steps:

      1. Go to sandbox.moodledemo.net
      2. Go to a course
      3. Create a database activity, you can leave settings as default
      4. Add a number field
      5. Add a '0' entry to the database
      6. Turn on Advanced Search
      7. Input '0' and search

      Expected: Only the result containing the number '0' should be shown

      Observed: The search term gets removed, and all results show instead.

            Unassigned Unassigned
            samual.preiss Samual Preiss
            Votes:
            5 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:

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