Ticket #1069 (closed defect: fixed)

Opened 14 years ago

Last modified 14 years ago

moving several items down doesn't work if the items are sequential

Reported by: cciupitu@… Owned by: trac
Priority: P2 Milestone: CPS 3.3.7
Component: CPSDefault Version: 3.3.6
Severity: minor Keywords: moveItemsDown


Steps to reproduce the bug. Create several items in a folder, lets' say:


Try to move down doc1 and doc2. It won't work, meaning that the items aren't moved at all; no CPS error is reported to the user, only the message Item(s) moved down.

The bug seems to be located in CPSDefault/skins/cps_default/moveItemsDown.py

The proposed patch fix is:

--- zope28/cps336/Products/CPSDefault/skins/cps_default/moveItemsDown.py    2005-10-27 00:04:55.000000000 +0300
+++ /tmp/moveItemsDown.py       2005-10-27 13:31:06.000000000 +0300
@@ -10,8 +10,7 @@
     ids = [ids]

 if ids:
-    for id in ids:
-        context.moveObjectsDown(id)
+    context.moveObjectsDown(ids)
     message = 'psm_item(s)_moved_down'
     message = 'psm_select_at_least_one_document'

The patch has been tested (under zope2.8.1) and works fine.

Change History

comment:1 Changed 14 years ago by fguillaume

  • Priority changed from P3 to P2
  • Milestone changed from unspecified to CPS 3.4.0

comment:2 Changed 14 years ago by fguillaume

More generally, all moveItems*.py can call underlying methods with all args in one step.

comment:3 Changed 14 years ago by fguillaume

  • Status changed from new to closed
  • Resolution set to fixed

Fixed in [28740].

Note: See TracTickets for help on using tickets.