diff --git a/plone/app/discussion/TODO.txt b/plone/app/discussion/TODO.txt
new file mode 100644
index 0000000..8202da5
--- /dev/null
+++ b/plone/app/discussion/TODO.txt
@@ -0,0 +1,37 @@
+==========================
+plone.app.discussion to-do
+==========================
+
+ [ ] Thread building in conversation.getThreads()
+ [ ] Batching in conversation.getComments()
+
+ [ ] ++comments++ namespace traversal adapter
+
+ [ ] Acquisition wrapping - should it happen on:
+
+ - Conversation retrieval methods (get, __getitem__, values etc)?
+ - IConversation adapter lookup?
+
+ [ ] Implement plone.indexer indexers for comments, filling standard metadata
+
+ - Note discrepancy between Python datetime and indexing expecting a Zope 2
+ DateTime field
+
+ [ ] Implement plone.indexer indexers for commented-upon content
+
+ - Unique set of commentators
+ - Number of comments
+ - Date/time of most recent comment
+
+ Needs to reindex when comment is added/removed (IContainerModifiedEvent)
+
+ [ ] Add tests for conversation dict API
+ [ ] Add tests for IReplies adapters
+
+ [ ] Make sure a catalog Clear & Rebuild doesn't lose all comments
+
+ [ ] Add BBB support for the existing portal_discussion interface
+
+ - implement in BBB package
+ - mix into tool.CommentingTool
+ - emit deprecation warnings
diff --git a/plone/app/discussion/comment.py b/plone/app/discussion/comment.py
index 9b849b2..d7c3dc2 100644
--- a/plone/app/discussion/comment.py
+++ b/plone/app/discussion/comment.py
@@ -1,6 +1,5 @@
"""The default comment class and factory.
"""
-import time
from datetime import datetime
from zope.interface import implements
from zope.component.factory import Factory
@@ -26,8 +25,8 @@ class Comment(Explicit, Traversable, RoleManager, Owned):
__parent__ = None
- comment_id = None # int
- in_reply_to = None # int
+ comment_id = None # long
+ in_reply_to = None # long
title = u""
@@ -44,7 +43,7 @@ class Comment(Explicit, Traversable, RoleManager, Owned):
author_email = None
def __init__(self, conversation=None, **kw):
- self.comment_id = long(time.time() * 1e6)
+ self.comment_id = None # will be set by IConversation.addComment()
self.__parent__ = conversation
self.creation_date = self.modification_date = datetime.now()
@@ -54,11 +53,11 @@ class Comment(Explicit, Traversable, RoleManager, Owned):
@property
def __name__(self):
- return unicode(self.comment_id)
+ return self.comment_id and unicode(self.comment_id) or None
@property
def id(self):
- return str(self.comment_id)
+ return self.comment_id and str(self.comment_id) or None
def getId(self):
"""The id of the comment, as a string
diff --git a/plone/app/discussion/configure.zcml b/plone/app/discussion/configure.zcml
index 06e0875..c49086f 100644
--- a/plone/app/discussion/configure.zcml
+++ b/plone/app/discussion/configure.zcml
@@ -8,12 +8,13 @@
+ name="default"
+ title="Plone Discussions"
+ description="Commenting infrastructure for Plone"
+ directory="profiles/default"
+ provides="Products.GenericSetup.interfaces.EXTENSION"
+ for="Products.CMFPlone.interfaces.IPloneSiteRoot"
+ />