diff --git a/CHANGES.txt b/CHANGES.txt index 165b205..cf558a0 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -4,6 +4,9 @@ Changelog 2.0b2 (Unreleased) ------------------ +- Fax Missing.Value for Creator in the catalog. Fixes #11634. + [rossp] + - Don't add the annotation unless a comment is actually being added. Fixes #11370. [rossp] diff --git a/plone/app/discussion/catalog.py b/plone/app/discussion/catalog.py index 13c48ae..18e59a2 100644 --- a/plone/app/discussion/catalog.py +++ b/plone/app/discussion/catalog.py @@ -72,7 +72,7 @@ def title(object): @indexer(IComment) def creator(object): - return object.creator.encode('utf-8') + return object.creator and object.creator.encode('utf-8') @indexer(IComment) def description(object): diff --git a/plone/app/discussion/tests/functional_test_comments.txt b/plone/app/discussion/tests/functional_test_comments.txt index e050ae7..ff96f0d 100644 --- a/plone/app/discussion/tests/functional_test_comments.txt +++ b/plone/app/discussion/tests/functional_test_comments.txt @@ -299,3 +299,47 @@ Make sure the edit was successful. >>> 'Lorem ipsum' in browser.contents True + + +List comments in a collection +----------------------------- + +Create a collection. + + >>> browser.open(portal.absolute_url()) + >>> browser.getLink(url='createObject?type_name=Topic').click() + >>> browser.getControl('Title', index=0 + ... ).value = 'Foo Comment Collection' + >>> browser.getControl('Save').click() + >>> print browser.contents + <...Changes saved... + +Set the collection criteria. + + >>> browser.getLink('Criteria').click() + >>> browser.getControl('Item Type', index=0).selected = True + >>> browser.getControl('Select content types').selected = True + >>> browser.getControl('Add criteria').click() + >>> print browser.contents + <...Added criterion ATPortalTypeCriterion for field Type... + + >>> browser.getControl('Comment').selected = True + >>> browser.getControl('Save', index=0).click() + >>> print browser.contents + <...Changes saved... + +View the collection listing. + + >>> browser.getLink('View').click() + >>> browser.getLink('admin on Doc1', index=0) + + >>> browser.getLink('admin on Doc1', index=1) + + >>> browser.getLink('Anonymous on Doc1', index=0) + + >>> browser.getLink('Anonymous on Doc1', index=1) + + >>> browser.getLink('Tarek Ziadé on Doc1') + + >>> browser.getLink('Jim Fultørn on Doc1') +