Uploaded image for project: 'PUBLIC - Liferay Portal Community Edition'
  1. PUBLIC - Liferay Portal Community Edition
  2. LPS-58168

Unable to save checkbox type custom field values if they are ALL unchecked

    Details

      Description

      Description
      When unmarking all checkboxes of an expando field then they won't be saved.

      Reproduction
      1. Start portal, log in with omniadmin
      2. At Control Panel/Custom Fields -> Add a custom field to Role:
      Key: customfield1
      Type: Group of text values
      3. Edit this custom field and set the Values separated by line breaks:
      val1
      val2
      val3
      Display Type: Checkbox

      4. Go to Control Panel / Users / Roles and edit User role
      5. Mark 1 checkbox at the created custom field, Save.
      6. Edit the same role again, assert that the marked checkbox is saved correctly.
      7. Uncheck all checkboxes. Save.

      8. Edit this role again, assert that the checkboxes didn't save correctly

      Reason
      Reason is that when a checkbox is unchecked its value won't be sent with the request. At server side it will be null. There is a check introduced with LPS-51379 which checks this and skips the adding procedure if the value is null.

      If all the checkboxes are unchecked then it won't be saved.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                adam.nagy Ádám T. Nagy (Inactive)
                Reporter:
                adam.nagy Ádám T. Nagy (Inactive)
                Participants of an Issue:
                Recent user:
                Esther Sanz
              • Votes:
                0 Vote for this issue
                Watchers:
                0 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Days since last comment:
                  4 years, 16 weeks, 1 day ago

                  Packages

                  Version Package