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

Example on how to modify a field definition in a content type?

    Details

    • Type: Story Story
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 5.0.0-dev
    • Component/s: None
    • Labels:
      None

      Description

      Can anyone give an example on how to change a field.
      Let's say, changing the field identifier "name" in the folder content type into
      "vname" ?

      There is no tests for this in the api tests. There is a test for modifying
      content type but not for modifying a field definition.

      All the field type tests are blocked due to fact that QA don't know how to do change field definition

        Activity

        Hide
        André Rømcke added a comment -

        Have you looked at "testUpdateFieldDefinition"; there is also relevant test for adding or removing FieldDefinitions from a ContentType in same test file.

        The "testUpdateFieldDefinition()" test can be seen here:
        https://github.com/ezsystems/ezp-next/blob/master/eZ/Publish/API/Repository/Tests/ContentTypeServiceTest.php#L1466

        So afaik, you create a contentType draft based on existing ContentType, then do like above and then publish the ContentType draft.
        Does this cover what your trying to do?

        Show
        André Rømcke added a comment - Have you looked at "testUpdateFieldDefinition"; there is also relevant test for adding or removing FieldDefinitions from a ContentType in same test file. The "testUpdateFieldDefinition()" test can be seen here: https://github.com/ezsystems/ezp-next/blob/master/eZ/Publish/API/Repository/Tests/ContentTypeServiceTest.php#L1466 So afaik, you create a contentType draft based on existing ContentType, then do like above and then publish the ContentType draft. Does this cover what your trying to do?

          People

          • Assignee:
            Unassigned
            Reporter:
            Bertrand Dunogier
          • Votes:
            0 Vote for this issue
            Watchers:
            1 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 - 15 minutes
              15m