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

Survey calculation for Single/Multiple choice is wrong if option lacks "option value"

    XMLWordPrintable

Details

    Description

      Hi

      If you specify a Single/Multiple choice question where you don't specify a option value for one of the options, then this option will not be ignored in survey calculations.
      Either the option shouldn't be ignored, or user should get a validation error if trying to publish a survey where a option value is missing

      Steps to reproduce

      Install ezp + ezsurvey. then do:

      <code>
      1. Click "Content structure" in top menu
      2. Create a new Survey
      Name : test survey
      3. Create new attribute "Single/Multiple Choice"
      Text of question : Color
      Create a new "Single/Multiple choice"
      Text of question : Pick a color
      Rendring style : Radio buttons in a row
      Option label : "Red", Value:1, Order:1
      Option label : "Blue", Value:2, Order:1
      Option label : "Green", Value:, Order:1 (Important : Make sure the "Value" field is empty for this option)
      4. Click "Send for publishing"
      5. Click the "Preview" bar below the top menu
      6. Click on link to "test survey"
      7. Click on radio button for "Green"
      8. Click "Submit" button
      9. Click "Survey" tab in top menu
      10. Click on "Results" icon in Survey list
      11. Verify that Green has count=1, 100%
      </code

      Attachments

        Activity

          People

            chen chen
            vl vl
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: