[CMF-checkins] SVN: CMF/branches/2.1/C - fixed indexing of
'in_reply_to'
Yvo Schubbe
y.2008 at wcm-solutions.de
Fri Jan 11 16:03:00 EST 2008
Log message for revision 82817:
- fixed indexing of 'in_reply_to'
Changed:
U CMF/branches/2.1/CHANGES.txt
U CMF/branches/2.1/CMFDefault/DiscussionItem.py
U CMF/branches/2.1/CMFDefault/tests/test_Discussions.py
-=-
Modified: CMF/branches/2.1/CHANGES.txt
===================================================================
--- CMF/branches/2.1/CHANGES.txt 2008-01-11 19:05:27 UTC (rev 82816)
+++ CMF/branches/2.1/CHANGES.txt 2008-01-11 21:02:59 UTC (rev 82817)
@@ -1,3 +1,10 @@
+CMF 2.1.2-beta (unreleased)
+
+ Bug Fixes
+
+ - CMFDefault DiscussionItem: Fixed indexing of 'in_reply_to'.
+
+
CMF 2.1.1 (2008/01/06)
Bug Fixes
Modified: CMF/branches/2.1/CMFDefault/DiscussionItem.py
===================================================================
--- CMF/branches/2.1/CMFDefault/DiscussionItem.py 2008-01-11 19:05:27 UTC (rev 82816)
+++ CMF/branches/2.1/CMFDefault/DiscussionItem.py 2008-01-11 21:02:59 UTC (rev 82817)
@@ -287,9 +287,9 @@
item.setFormat(text_format)
item._edit(text)
item.addCreator(Creator)
+ item.setReplyTo(self._getDiscussable())
+
item.indexObject()
-
- item.setReplyTo( self._getDiscussable() )
item.notifyWorkflowCreated()
return id
Modified: CMF/branches/2.1/CMFDefault/tests/test_Discussions.py
===================================================================
--- CMF/branches/2.1/CMFDefault/tests/test_Discussions.py 2008-01-11 19:05:27 UTC (rev 82816)
+++ CMF/branches/2.1/CMFDefault/tests/test_Discussions.py 2008-01-11 21:02:59 UTC (rev 82817)
@@ -202,6 +202,7 @@
def test_itemCataloguing( self ):
ctool = self.site._setObject( 'portal_catalog', CatalogTool() )
+ ctool.addColumn('in_reply_to')
dtool = self.site.portal_discussion
catalog = ctool._catalog
test = self._makeDummyContent('test', catalog=1)
@@ -222,6 +223,10 @@
'/bar/site/test/talkback/%s' % reply.getId() ) )
reply1 = talkback.getReplies()[0]
+ path1 = '/'.join(reply1.getPhysicalPath())
+ self.assertEqual( ctool.getMetadataForUID(path1),
+ {'in_reply_to': None} )
+
talkback1 = dtool.getDiscussionFor(reply1)
talkback1.createReply( title='test2'
, text='blah2'
@@ -235,6 +240,11 @@
self.failUnless( has_path( catalog,
'/bar/site/test/talkback/%s' % reply.getId() ) )
+ reply2 = talkback1.getReplies()[0]
+ path2 = '/'.join(reply2.getPhysicalPath())
+ self.assertEqual( ctool.getMetadataForUID(path2),
+ {'in_reply_to': reply1.getId()} )
+
def test_itemWorkflowNotification(self):
from Products.CMFDefault.DiscussionItem import DiscussionItem
More information about the CMF-checkins
mailing list