Uploaded image for project: 'Moodle app'
  1. Moodle app
  2. MOBILE-4234

Database: number fields don't consider 0 as a value

    XMLWordPrintable

Details

    • Hide

      This issue only needs to be tested in 1 device.

      1. Login in master site and open the databases specified by Isa in the comments (they are databases including required number fields).
      2. Click to create a new entry.
      3. Try to send the form without entering any data in the required number fields. Check that an error is displayed because you didn't fill the number field.
      4. Now enter "0" and submit the form again. Check that now the entry is correctly created.
      Show
      This issue only needs to be tested in 1 device. Login in master site and open the databases specified by Isa in the comments (they are databases including required number fields). Click to create a new entry. Try to send the form without entering any data in the required number fields. Check that an error is displayed because you didn't fill the number field. Now enter "0" and submit the form again. Check that now the entry is correctly created.
    • MOODLE_401_STABLE
    • MOODLE_401_STABLE
    • Moodle App 4.1.1

    Description

      Hi,

      When a user fills up a number field on a database with 0, the database considers as if the user didn't introduce anything.

      Some considerations:

      • With one number field that IS required: if a user fills it up with a 0 and then tries to save the entry, they will see "You did not fill up any fields!" message
      • With other fields and one number field that is NOT required: if a user tries fills the fields up and fills the number field with a 0 and save the entry, the entry will be save BUT the number field will be left empty
      • With other fields and one number field that IS required: if a user tries fills the fields up and fills the number field with a 0 and tries to save the entry, the entry will NOT be save and under the number field there will be 'You must supply a value here'

      What should happen?
      The database should save 0 on the number field.

      Thanks!!
      Isabel
       

      Attachments

        Issue Links

          Activity

            People

              dpalou Dani Palou
              isabelrenedo Isabel Renedo Rouco
              Noel De Martin Noel De Martin
              Isabel Renedo Rouco Isabel Renedo Rouco
              Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Clockify

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