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

collected surveys associated with older versions of the survey contentobject is deleted

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: High
    • Resolution: Obsolete
    • Affects Version/s: 4.0.1
    • Fix Version/s: None
    • Labels:
      None
    • Environment:

      Operating System:LAMP+WAMP
      PHP Version: (please be specific, like '4.4.3' or '5.1.5') 5.2.x
      Database and version:mysql 5
      Browser (and version):FF3, IE7

      Description

      since the survey is an attribute on a contentclass, it is affected by this default setting in settings/content.ini:

      [VersionManagement]
      DefaultVersionHistoryLimit=10
      

      so if you continue to modify the survey after it has been published and used, you will increase the number of versions of the contentobject, and eZ Publish will start removing version of the object later than version 10 upon re-publishing.

      the problem is that this will also delete the already received surveys.

      this has been tested on a LAMP production environment, and on a local WAMP environment, with the eZ Survey 2.0 distribution.

      ps: please add a eZ Survey 2 "Affected version" option to the issue tracker.

      Steps to reproduce

      1. on ezp401 vanilla, install ezsurvey 2.0
      2. install standard contentclass packages
      3. create a survey with text input field
      4. fill out and submit the survey
      5. republish survey 10 times (increasing version # to 11)
      6. list all the received surveys in admin interface.

      expected result:
      the first survey submitted is still available

      actual result:
      the first submitted survey is gone.

      suggestion for solution (not investigated though):
      the ezsurvey datatype may implement a method called "OnPublish"or something similar, which may be triggered just in time to prevent eZ Publish from removing the surveys filled out with a version that is about to be deleted.

      since this may mean that you end up with surveys in the database with more or less fields than the actual published survey (or any of the 10 version stored in the database), some decision on behavior needs to be made.

      for instance, only fields in the published survey object are used in the templates.
      additional fields in the collected survey will not be displayed.
      non-existing fields in the collected survey will display false or empty string.

      a workaround may be to increase the number of versions of the survey class stored, but this is not very intuitive, since this functionality is based on class ID:

      [VersionManagement]
      #ID 27 equals my survey content class
      VersionHistoryClass[27]=99
      

      so if the user creates a new survey contentclass, eZ Publish will only store 10 versions of objects based on it.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              unknown unknown
              Reporter:
              jkn Jostein- Knudsen
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated: