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

Public API: defaultValue for Relation FieldType is not honored

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Medium Medium
    • Resolution: Won't Fix
    • Affects Version/s: Known Issues 5.x Stack, 5.0
    • Component/s: None
    • Environment:

      Operating System: RHEL 62
      PHP Version: 5.3.3
      Database and version:5.1.61
      Browser N/A

      Description

      Using the API, when creating a ContentType with a Relation FieldType attribute (FieldDefinition), the defaultValue property for the FieldDefinition will not be honored, regardless if the value assigned to it is a Content ID (int) or a ContentInfo.

      Steps to Reproduce:To reproduce:

      1. Using the API, create a ContentType with a Relation FieldDefinition
      2. Set the FieldDefinition `defaultValue` property to an existing Content ID or ContentInfo
      3. Verify through the interface that the attribute does not contain a default value.

        Issue Links

          Activity

          Hide
          André Rømcke added a comment -

          Closing issue as won't fix as we don't inted to enhance legacy to add this feature.

          Show
          André Rømcke added a comment - Closing issue as won't fix as we don't inted to enhance legacy to add this feature.
          Hide
          Petar Spanja (Inactive) added a comment -

          The actual problem here is on the Legacy Stack side - LS does not support default value for ezobjectrelation, admin interface is not reflecting it and this causes Selenuim test to fail.

          eZPublish 5 Relation FieldType seems to work correctly, and the fix for the issue would be to update Legacy Stack to support default value for ezobjectrelation.

          Question here is - do we want to do that?

          Show
          Petar Spanja (Inactive) added a comment - The actual problem here is on the Legacy Stack side - LS does not support default value for ezobjectrelation, admin interface is not reflecting it and this causes Selenuim test to fail. eZPublish 5 Relation FieldType seems to work correctly, and the fix for the issue would be to update Legacy Stack to support default value for ezobjectrelation. Question here is - do we want to do that?
          Hide
          Bertrand Dunogier added a comment -

          Could you provide us with the exact code you use to test this, in any case ?

          It will save time for everybody.

          Show
          Bertrand Dunogier added a comment - Could you provide us with the exact code you use to test this, in any case ? It will save time for everybody.
          Hide
          Petar Spanja (Inactive) added a comment -

          The counterpart in 4.x (ezobjectrelation) does not support default value.
          There was probably a reason behind this, if someone can confirm that we want this in v5 I will implement it, otherwise issue should be closed.

          BTW, not sure where you could see the default value in interface?

          Show
          Petar Spanja (Inactive) added a comment - The counterpart in 4.x (ezobjectrelation) does not support default value. There was probably a reason behind this, if someone can confirm that we want this in v5 I will implement it, otherwise issue should be closed. BTW, not sure where you could see the default value in interface?

            People

            • Assignee:
              Unassigned
              Reporter:
              Bertrand Dunogier
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 day
                1d
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 15 minutes Time Not Required
                1h 15m

                  Agile