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

"Order values" of ezobjectrelationlist is not updated on removal of object

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: High High
    • Resolution: Fixed
    • Affects Version/s: 4.7.0, 5.0, 5.1, 5.2
    • Fix Version/s: Customer request
    • Component/s: Misc
    • Labels:

      Description

      The order of ezobjectlist is not updated when you remove one or more objects

      Steps to Reproduce

      1. Alter Article class and add an Object relations attribute
      2. Create four file content objects: file_001, file_002, file_003, file_004
      3. Create article_001 and add the four file objects into the Object relations attribute
      4. Confirm that each object has the correct order number. If you upload in sequence, file_001 should have order 1, file_002 should have order 2, and so on.
      5. Publish the article
      6. Now, go to the backend and delete (do not sent to trash) file_003
      7. Edit article_001 and look at Object relations attribute
      8. file_001 has order 1, file_002 has order 2, but file_004 still has order 4

      If you have 4 objects:
      object 1 - sort order 1
      object 2 - sort order 2
      object 3 - sort order 3
      object 4 - sort order 4
       
      delete object 3, and you are left with
       
      object 1 - sort order 1
      object 2 - sort order 2
      object 4 - sort order 4 (the expected sort order is 3)
      
      

        Issue Links

          Activity

          Hide
          Yannick Roger (Inactive) added a comment -

          The "order values" provided are here to help out the editor sorting it's list.
          One can add any kind of values 10, 20, 25, 32 and, on publication, they will be replaced by consecutive numbers 1, 2, 3, 4

          If an item is removed, the list is still valid, because items are still in order. The "order values" won't be updated (and replaced by consecutive numbers) unless the object is re published.

          So unless it leads to another use case, or if the existing documentation states differently, this cosmetic flaw is not a bug.

          Show
          Yannick Roger (Inactive) added a comment - The "order values" provided are here to help out the editor sorting it's list. One can add any kind of values 10, 20, 25, 32 and, on publication, they will be replaced by consecutive numbers 1, 2, 3, 4 If an item is removed, the list is still valid, because items are still in order. The "order values" won't be updated (and replaced by consecutive numbers) unless the object is re published. So unless it leads to another use case, or if the existing documentation states differently, this cosmetic flaw is not a bug.
          Hide
          André Rømcke added a comment - - edited

          Doc updated:
          https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Datatypes/Object-relations

          "Objects relation order" section:
          "Note: If a related content object is deleted, the order won't be update to let the editor know that some content was removed. It can lead to non-sequential set of values This is the intended behavior. If the object is republished, the order will updated in a sequential way."

          Show
          André Rømcke added a comment - - edited Doc updated: https://doc.ez.no/eZ-Publish/Technical-manual/4.x/Reference/Datatypes/Object-relations "Objects relation order" section: "Note: If a related content object is deleted, the order won't be update to let the editor know that some content was removed. It can lead to non-sequential set of values This is the intended behavior. If the object is republished, the order will updated in a sequential way."
          Hide
          Paulo Nunes (Inactive) added a comment -

          QA Approved

          Show
          Paulo Nunes (Inactive) added a comment - QA Approved

            People

            • Assignee:
              Unassigned
              Reporter:
              Eduardo Fernandes (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              6 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 - 6 hours, 25 minutes
                6h 25m