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

Public API - Creating new location for object, on the original location it doesn't show the new location

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Invalid
    • Affects Version/s: 5.1-dev
    • Fix Version/s: QA tracked issues
    • Labels:
    • Environment:

      Server OS: Red Hat 6
      Database: MySQL 5.1.61
      Browser: Firefox 18.0.1

    • Sprint:
      Stetind Sprint 6

      Description

      When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
      However at the new location both locations are shown up

      Code:
      at ezpublishapilocations.php

          function _testTC625Locations__stage3()
          {
              $this->api->createLocation( "/News_1/TL1", "/News_2/" );
          }
      

      at ezpublishapitesthelper.php

          public function createLocation ( $contentPath, $parentLocationPath )
          {
              return $this->saveLocation(
                  $this->getContentInfoByPath( $contentPath ),
                  $this->newLocation( $parentLocationPath )
              );
          }
       
          public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
          {
              $locationService = $this->repo->getLocationService();
              $newLocation = $locationService->createLocation( $contentInfo, $location );
       
              $this->addToHistory( static::ACTION_CREATE_LOCATION,
                  array(
                      'id' => $newLocation->id
                  )
              );
       
              return $newLocation;
          }
      

        Activity

        Marcos Loureiro (Inactive) created issue -
        André Rømcke made changes -
        Field Original Value New Value
        Status Open [ 1 ] Backlog [ 10000 ]
        Marcos Loureiro (Inactive) made changes -
        Description When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {noformat}

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }

        {noformat}

        at ezpublishapitesthelper.php
        {noformat}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {noformat}
        When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {noformat}

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }

        {noformat}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        Marcos Loureiro (Inactive) made changes -
        Description When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {noformat}

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }

        {noformat}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {code

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }
        {code}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        Marcos Loureiro (Inactive) made changes -
        Description When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {code

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }
        {code}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {code

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }

        {code}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        Marcos Loureiro (Inactive) made changes -
        Description When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {code

            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }

        {code}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        When creating a new location for an object through the Public API, on the original location in the "Locations" details there is only the original location.
        However at the new location both locations are shown up

        Code:
        at ezpublishapilocations.php
        {code}
            function _testTC625Locations__stage3()
            {
                $this->api->createLocation( "/News_1/TL1", "/News_2/" );
            }
        {code}

        at ezpublishapitesthelper.php
        {code}
            public function createLocation ( $contentPath, $parentLocationPath )
            {
                return $this->saveLocation(
                    $this->getContentInfoByPath( $contentPath ),
                    $this->newLocation( $parentLocationPath )
                );
            }

            public function saveLocation( ContentInfo $contentInfo, LocationCreateStruct $location )
            {
                $locationService = $this->repo->getLocationService();
                $newLocation = $locationService->createLocation( $contentInfo, $location );

                $this->addToHistory( static::ACTION_CREATE_LOCATION,
                    array(
                        'id' => $newLocation->id
                    )
                );

                return $newLocation;
            }
        {code}
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Assignee André Rømcke [ andre.romcke@ez.no ]
        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 -
        Rank Ranked higher
        André Rømcke made changes -
        Sprint Stetind Sprint 6 [ 7 ]
        André Rømcke made changes -
        Status Backlog [ 10000 ] Development [ 3 ]
        André Rømcke made changes -
        Status Development [ 3 ] Backlog [ 10000 ]
        Assignee André Rømcke [ andre.romcke@ez.no ]
        André Rømcke made changes -
        Rank Ranked higher
        André Rømcke made changes -
        Rank Ranked lower
        André Rømcke made changes -
        Status Backlog [ 10000 ] InputQ [ 10001 ]
        Marcos Loureiro (Inactive) made changes -
        Assignee Marcos Loureiro [ marcos.loureiro@ez.no ]
        Jérôme Vieilledent (Inactive) made changes -
        Status InputQ [ 10001 ] Development [ 3 ]
        Assignee Marcos Loureiro [ marcos.loureiro@ez.no ] Jerome Vieilledent [ jerome.vieilledent@ez.no ]
        Jérôme Vieilledent (Inactive) made changes -
        Remaining Estimate 1 day [ 28800 ] 7 hours [ 25200 ]
        Time Spent 1 hour [ 3600 ]
        Worklog Id 31435 [ 31435 ]
        Jérôme Vieilledent (Inactive) made changes -
        Status Development [ 3 ] Devlopment done [ 5 ]
        Jérôme Vieilledent (Inactive) made changes -
        Assignee Jerome Vieilledent [ jerome.vieilledent@ez.no ]
        Status Devlopment done [ 5 ] Closed [ 6 ]
        Resolution Invalid [ 6 ]
        André Rømcke made changes -
        Workflow eZ Engineering Scrumban Workflow [ 51846 ] EZ* Development Workflow [ 83503 ]
        Alex Schuster made changes -
        Workflow EZ* Development Workflow [ 83503 ] EZEE Development Workflow [ 122104 ]

          People

          • Assignee:
            Unassigned
            Reporter:
            Marcos Loureiro (Inactive)
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 1 day
              1d
              Remaining:
              Time Spent - 1 hour Remaining Estimate - 7 hours
              7h
              Logged:
              Time Spent - 1 hour Remaining Estimate - 7 hours
              1h

                Agile