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

Custom user profile field does not display when value 0

    • MOODLE_405_STABLE
    • Hide
      • Go to Admin -> Users -> User profile fields and create a few text fields, for e.g.
        • Add a text field shortname year and full name Year
        • Add another text field shortname school and full name School
      • Go to Admin -> Browse list of users and add a user
        • Add Year: 0
        • Add School: The random school
      • Go to the user profile view page (user/profile.php) and you will see that only the title is present but the value is missing, and Year  field is after the School field.
      • Apply the patch and see that Year field value is shown below its title, and it is rendered above School field as expected.
      Show
      Go to Admin -> Users -> User profile fields and create a few text fields, for e.g. Add a text field shortname year and full name Year Add another text field shortname school and full name School Go to Admin -> Browse list of users and add a user Add Year : 0 Add School : The random school Go to the user profile view page (user/profile.php) and you will see that only the title is present but the value is missing, and Year   field is after the School field. Apply the patch and see that Year field value is shown below its title, and it is rendered above School field as expected.
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-83694 using repository: https://github.com/sumaiyamannan/moodle

      Should these errors be fixed?

      Built on: Thu Jan 30 08:36:32 PM UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-83694 using repository: https://github.com/sumaiyamannan/moodle MOODLE_405_STABLE (0 errors / 2 warnings) [branch: MDL-83694 | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/2) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/0) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Thu Jan 30 08:36:32 PM UTC 2025

      The custom user profile is field is missing on user profile page when its value is 0. In addition it is being displayed at the end of the list.

        1. bug.png
          bug.png
          36 kB
        2. expected.png
          expected.png
          34 kB

            sumaiyajaved Sumaiya Javed
            sumaiyajaved Sumaiya Javed
            Meirza Meirza
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:

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