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

          Filipe Dobreira (Inactive) created issue -
          Petar Spanja (Inactive) made changes -
          Field Original Value New Value
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          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?
          jenkins made changes -
          Project eZ Publish [ 10401 ] eZ Publish LegacyStack (4.x) Development [ 10701 ]
          Key EZP-137 EZPLS-53
          Workflow eZ Community Workflow [ 16055 ] eZ Engineering Kanban Workflow [ 17952 ]
          Reporter Filipe Dobreira [ filipe.dobreira@ez.no ] Bertrand Dunogier [ bertrand.dunogier@ez.no ]
          Affects Version/s Kilimanjaro [ 10600 ]
          Affects Version/s Kilimanjaro [ 10300 ]
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          Component/s Public API [ 10308 ]
          Vidar Langseid made changes -
          Project eZ Publish LegacyStack (4.x) Development [ 10701 ] eZ Publish [ 10401 ]
          Key EZPLS-53 EZP-19868
          Workflow eZ Engineering Kanban Workflow [ 17952 ] eZ Community Workflow [ 34040 ]
          Affects Version/s 5.0.0-dev [ 11014 ]
          Affects Version/s Kilimanjaro [ 10600 ]
          Vidar Langseid made changes -
          Fix Version/s QA tracked issues [ 11072 ]
          Fix Version/s 5.0 Certification [ 11013 ]
          Vidar Langseid made changes -
          Link This issue is duplicated by EZP-19645 [ EZP-19645 ]
          Vidar Langseid made changes -
          Summary defaultValue for Relation FieldType is not honored Public API: defaultValue for Relation FieldType is not honored
          Vidar Langseid made changes -
          Vidar Langseid made changes -
          Status Open [ 1 ] Backlog [ 10000 ]
          Vidar Langseid made changes -
          Status Backlog [ 10000 ] InputQ [ 10001 ]
          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.
          Vidar Langseid made changes -
          Priority High [ 3 ] Medium [ 4 ]
          Vidar Langseid made changes -
          Status InputQ [ 10001 ] Backlog [ 10000 ]
          André Rømcke made changes -
          Affects Version/s Known Issues [ 11285 ]
          Affects Version/s 5.0.0 [ 10300 ]
          Affects Version/s 5.0.0-dev [ 11014 ]
          André Rømcke made changes -
          Workflow eZ Community Workflow [ 34040 ] eZ Engineering Scrumban Workflow [ 35737 ]
          Filipe Dobreira (Inactive) made changes -
          Link This issue blocks EZP-19738 [ EZP-19738 ]
          André Rømcke made changes -
          Rank Ranked higher
          André Rømcke made changes -
          Remaining Estimate 1 day [ 28800 ]
          André Rømcke made changes -
          Original Estimate 1 day [ 28800 ]
          André Rømcke made changes -
          Epic Link PM-69 [ 32100 ]
          André Rømcke made changes -
          Sprint Stetind Sprint 5 [ 6 ]
          Petar Spanja (Inactive) made changes -
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          Petar Spanja (Inactive) made changes -
          Status Backlog [ 10000 ] Development [ 3 ]
          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?
          Petar Spanja (Inactive) made changes -
          Remaining Estimate 1 day [ 28800 ] 7 hours [ 25200 ]
          Time Spent 1 hour [ 3600 ]
          Worklog Id 27929 [ 27929 ]
          Petar Spanja (Inactive) logged work - 04/Feb/13 1:37 PM
          • Time Spent:
            1 hour
             

            validating the issue

          Petar Spanja (Inactive) made changes -
          Status Development [ 3 ] Devlopment done [ 5 ]
          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.
          André Rømcke made changes -
          Assignee Petar Spanja [ petar.spanja@ez.no ]
          Status Devlopment done [ 5 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          André Rømcke logged work - 04/Feb/13 2:17 PM
          • Time Spent:
            15 minutes
             
            <No comment>
          André Rømcke made changes -
          Resolution Won't Fix [ 2 ]
          Status Closed [ 6 ] Reopened [ 4 ]
          André Rømcke made changes -
          issue.field.resolutiondate 2013-02-04 13:17:46.0 2013-02-04 13:17:46.078
          Remaining Estimate 7 hours [ 25200 ] 0 minutes [ 0 ]
          Time Spent 1 hour [ 3600 ] 1 hour, 15 minutes [ 4500 ]
          Worklog Id 27933 [ 27933 ]
          André Rømcke made changes -
          Status Reopened [ 4 ] Closed [ 6 ]
          Resolution Won't Fix [ 2 ]
          André Rømcke made changes -
          Workflow eZ Engineering Scrumban Workflow [ 35737 ] EZ* Development Workflow [ 70410 ]
          Alex Schuster made changes -
          Workflow EZ* Development Workflow [ 70410 ] EZEE Development Workflow [ 108943 ]
          Transition Time In Source Status Execution Times Last Executer Last Execution Date
          Open Open Backlog Backlog
          32d 16h 40m 1 Vidar Langseid 22/Oct/12 11:18 AM
          Backlog Backlog InputQ InputQ
          4m 53s 1 Vidar Langseid 22/Oct/12 11:23 AM
          InputQ InputQ Backlog Backlog
          1d 33m 1 Vidar Langseid 23/Oct/12 11:56 AM
          Backlog Backlog Development Development
          103d 23h 31m 1 Petar Spanja (Inactive) 04/Feb/13 10:28 AM
          Development Development Development Done Development Done
          3h 12m 1 Petar Spanja (Inactive) 04/Feb/13 1:41 PM
          Development Done Development Done Closed Closed
          35m 40s 1 André Rømcke 04/Feb/13 2:16 PM
          Closed Closed Reopened Reopened
          25s 1 André Rømcke 04/Feb/13 2:17 PM
          Reopened Reopened Closed Closed
          22s 1 André Rømcke 04/Feb/13 2:17 PM

            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