[Testbot] Plone 5.0 - Python 2.7 - Build # 1950 - Still failing! - 59 failure(s)
jenkins at plone.org
jenkins at plone.org
Thu Mar 13 09:15:14 UTC 2014
-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 1950 - Still Failing!
-------------------------------------------------------------------------------
http://jenkins.plone.org/job/plone-5.0-python-2.7/1950/
-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------
Repository: Products.CMFPlone
Branch: refs/heads/master
Date: 2014-03-13T09:07:29+01:00
Author: Philip Bauer (pbauer) <bauer at starzel.de>
Commit: https://github.com/plone/Products.CMFPlone/commit/6730b4f2d791bf0b51f1751a863ba7691f191cea
Strip leading & trailing spaces from id and title in rename-form
Files changed:
M Products/CMFPlone/skins/plone_scripts/folder_rename.cpy
M Products/CMFPlone/tests/testFolderButtons.py
M docs/CHANGES.rst
diff --git a/Products/CMFPlone/skins/plone_scripts/folder_rename.cpy b/Products/CMFPlone/skins/plone_scripts/folder_rename.cpy
index 1240e7a..6feba47 100644
--- a/Products/CMFPlone/skins/plone_scripts/folder_rename.cpy
+++ b/Products/CMFPlone/skins/plone_scripts/folder_rename.cpy
@@ -17,6 +17,9 @@ request = context.REQUEST
message = None
putils = context.plone_utils
+new_ids = [i.strip() for i in new_ids]
+new_titles = [i.strip() for i in new_titles]
+
orig_template = request.get('orig_template', None)
change_template = paths and orig_template is not None
if change_template:
diff --git a/Products/CMFPlone/tests/testFolderButtons.py b/Products/CMFPlone/tests/testFolderButtons.py
index 86ff647..fe0c37f 100644
--- a/Products/CMFPlone/tests/testFolderButtons.py
+++ b/Products/CMFPlone/tests/testFolderButtons.py
@@ -56,6 +56,18 @@ def testTitleAndIdAreUpdatedOnFolderRename(self):
self.assertTrue(getattr(self.folder.foo, 'baz', None) is not None)
self.assertEqual(self.folder.foo.baz.Title(), title)
+ def testWhitespacesAreStrippedOnFolderRename(self):
+ # Make sure renaming removes leading and trailing whitespaces
+ new_title = ' Test Folder - Snooze! '
+ new_id = ' baz '
+ transaction.savepoint(optimistic=True) # make rename work
+ doc_path = '/'.join(self.folder.foo.doc1.getPhysicalPath())
+ self.folder.folder_rename(paths=[doc_path], new_ids=[new_id],
+ new_titles=[new_title])
+ self.assertEqual(getattr(self.folder.foo, 'doc1', None), None)
+ self.assertNotEqual(getattr(self.folder.foo, 'baz', None), None)
+ self.assertEqual(self.folder.foo.baz.Title(), 'Test Folder - Snooze!')
+
def testCatalogTitleAndIdAreUpdatedOnFolderRename(self):
# Make sure catalog updates title on rename
title = 'Test Folder - Snooze!'
diff --git a/docs/CHANGES.rst b/docs/CHANGES.rst
index fe3f205..7fcc3dd 100644
--- a/docs/CHANGES.rst
+++ b/docs/CHANGES.rst
@@ -8,6 +8,11 @@ Changelog
5.0a1 (unreleased)
------------------
+- Strip leading & trailing spaces from id and title in rename-form.
+ See https://dev.plone.org/ticket/12998, https://dev.plone.org/ticket/12989,
+ https://dev.plone.org/ticket/9370, https://dev.plone.org/ticket/8338
+ [pbauer]
+
- remove quickinstall control panel form since a new one was moved to
plone.app.controlpanel
[vangheem]
-------------------------------------------------------------------------------
-------------- next part --------------
A non-text attachment was scrubbed...
Name: CHANGES.log
Type: application/octet-stream
Size: 2876 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140313/9b065bdc/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: build.log
Type: application/octet-stream
Size: 254337 bytes
Desc: not available
URL: <http://lists.plone.org/pipermail/plone-testbot/attachments/20140313/9b065bdc/attachment-0003.obj>
More information about the Testbot
mailing list