Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-25002

Unable to add more options to ezselection field type

    Details

      Description

      Steps to reproduce

      1. Go to PlatformUI;
      2. Create a content type having a ezselection field;
      3. Add an option, you'll notice that there is not "add option" button

        Issue Links

          Activity

          Hide
          Paulo Nunes (Inactive) added a comment -

          [~damien.pobel@ez.no]
          Two remarks
          1) Error when creating an object based on a content that has a selection fieldtype. This happens either I have single or multiple choice
          -Create one content type with an ezselection fieldtype
          -Create one object using the previously created content type. When pressing the "Publish" button, I have an error

          {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":400,"errorMessage"
          :"Bad Request","errorDescription":"Content fields did not validate","errorDetails":{"fields":[{"_fieldTypeId"
          :186,"errors":[{"type":"selection","message":"Option with index 0 does not exist in the field definition
          ."}]}]}}}
          

          2) One doubt regarding the scope and the order of the inserted options.
          Executing the previously referred steps, i.e:

          -Add 3 options, being that the second one is empty. We will have this: option1, <empty>, option2
          -Press "apply" button. We see that the empty line is removed - ok. We will end up with: "option1" and "option2"
          -Add a 3rd option: Option3. We end up with 3 options: "option1", "option2" and "option3"
          -Press "apply" button again. (...)

          I was expecting to have the inserted order i.e, "Option1" > "Option2" > "Option3". But instead, I have "Option1" > "Option3" > "Option2" (the 2 changed order with the 3). If we create an object based on this content type, this order is also the one that is shown (1->3->2)

          As far as I saw in the requirements, the order is not referred.
          If the inserted order is to be respected, then i'm pending for a follow-up of the current issue. Please advise.

          Show
          Paulo Nunes (Inactive) added a comment - [~damien.pobel@ez.no] Two remarks 1) Error when creating an object based on a content that has a selection fieldtype. This happens either I have single or multiple choice -Create one content type with an ezselection fieldtype -Create one object using the previously created content type. When pressing the "Publish" button, I have an error {"ErrorMessage":{"_media-type":"application\/vnd.ez.api.ErrorMessage+json","errorCode":400,"errorMessage" :"Bad Request","errorDescription":"Content fields did not validate","errorDetails":{"fields":[{"_fieldTypeId" :186,"errors":[{"type":"selection","message":"Option with index 0 does not exist in the field definition ."}]}]}}} 2) One doubt regarding the scope and the order of the inserted options. Executing the previously referred steps , i.e: -Add 3 options, being that the second one is empty. We will have this: option1, <empty>, option2 -Press "apply" button. We see that the empty line is removed - ok. We will end up with: "option1" and "option2" -Add a 3rd option: Option3. We end up with 3 options: "option1", "option2" and "option3" -Press "apply" button again. (...) I was expecting to have the inserted order i.e, "Option1" > "Option2" > "Option3". But instead, I have "Option1" > "Option3" > "Option2" (the 2 changed order with the 3). If we create an object based on this content type, this order is also the one that is shown (1->3->2) As far as I saw in the requirements , the order is not referred. If the inserted order is to be respected, then i'm pending for a follow-up of the current issue. Please advise.
          Hide
          Damien Pobel (Inactive) added a comment -

          I updated the patches to be applied to repository forms 1.6 and PlatformUI 1.7.

          Paulo Nunes I was not able to reproduce the first issue in your last comment. For the second one, actually we should keep the empty entry add there are usecases where it makes sense to have an empty option. This is fixing the second issue.

          Show
          Damien Pobel (Inactive) added a comment - I updated the patches to be applied to repository forms 1.6 and PlatformUI 1.7. Paulo Nunes I was not able to reproduce the first issue in your last comment. For the second one, actually we should keep the empty entry add there are usecases where it makes sense to have an empty option. This is fixing the second issue.
          Hide
          Paulo Nunes (Inactive) added a comment -

          Indeed I no longer can reproduce the first issue from my last comment

          Show
          Paulo Nunes (Inactive) added a comment - Indeed I no longer can reproduce the first issue from my last comment
          Hide
          Rui Silva (Inactive) added a comment -

          Sending back to dev-needed so that PRs can be merged.
          Please close issue afterwards.

          Show
          Rui Silva (Inactive) added a comment - Sending back to dev-needed so that PRs can be merged. Please close issue afterwards.
          Hide
          Rui Silva (Inactive) added a comment -

          It was verified by QA that the empty entry adds remain in their due initial positions, and adding other ones afterwards does not change the order of the previous ones in any way, as it was expected.

          Show
          Rui Silva (Inactive) added a comment - It was verified by QA that the empty entry adds remain in their due initial positions, and adding other ones afterwards does not change the order of the previous ones in any way, as it was expected.

            People

            • Assignee:
              Unassigned
              Reporter:
              Pedro Resende (Inactive)
            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 2 hours, 40 minutes
                2d 2h 40m