l.b.b.b.BugComment(MessageComment) : class documentation

Part of lp.bugs.browser.bugcomment View In Hierarchy

Data structure that holds all data pertaining to a bug comment.

It keeps track of which index it has in the bug comment list and also provides functionality to truncate the comment.

Note that although this class is called BugComment it really takes as an argument a bugtask. The reason for this is to allow canonical_url()s of BugComments to take you to the correct (task-specific) location.

Method __init__ Undocumented
Method bugattachments Undocumented
Method show_for_admin Show hidden comments for Launchpad admins.
Method text_for_display Undocumented
Method isIdenticalTo Compare this BugComment to another and return True if they are
Method isEmpty Return True if text_for_display is empty.
Method add_comment_url Undocumented
Method download_url Undocumented
Method show_activity Return True if the activity should be shown for this comment.

Inherited from MessageComment:

Method extra_css_class Undocumented
Method display_attachments Undocumented
Method comment_author The author of the comment.
Method has_body Is there body text?
Method comment_date The date of the comment.
Method body_text Undocumented
Method too_long Undocumented
Method too_long_to_render Undocumented
def __init__(self, index, message, bugtask, activity=None, show_spam_controls=False, user=None, display='full'):
Undocumented
@cachedproperty
def bugattachments(self):
Undocumented
@property
def show_for_admin(self):
Show hidden comments for Launchpad admins.

This is used in templates to add a class to hidden comments to enable display for admins, so the admin can see the comment even after it is hidden. Since comments aren't published unless the user is registry or admin, this can just check if the comment is visible.

@cachedproperty
def text_for_display(self):
Undocumented
def isIdenticalTo(self, other):
Compare this BugComment to another and return True if they are identical.
def isEmpty(self):
Return True if text_for_display is empty.
@property
def add_comment_url(self):
Undocumented
@property
def download_url(self):
Undocumented
@property
def show_activity(self):
Return True if the activity should be shown for this comment.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.