390 lines
No EOL
8.7 KiB
HTML
390 lines
No EOL
8.7 KiB
HTML
<!-- title: Comment -->
|
|
|
|
|
|
|
|
|
|
|
|
<div class="dev-header">
|
|
|
|
<a class="btn btn-default btn-sm" disabled style="margin-bottom: 10px;">
|
|
Version 6.6.1</a>
|
|
|
|
|
|
<a class="btn btn-default btn-sm" href="https://github.com/frappe/frappe/tree/v6.6.1/frappe/core/doctype/comment"
|
|
target="_blank" style="margin-left: 10px; margin-bottom: 10px;"><i class="octicon octicon-mark-github"></i> Source</a>
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
|
|
<p><b>Table Name:</b> <code>tabComment</code></p>
|
|
|
|
|
|
|
|
|
|
<h3>Fields</h3>
|
|
|
|
<table class="table table-bordered" style="table-layout: fixed;">
|
|
<thead>
|
|
<tr>
|
|
<th style="width: 5%">Sr</th>
|
|
<th style="width: 25%">Fieldname</th>
|
|
<th style="width: 20%">Type</th>
|
|
<th style="width: 25%">Label</th>
|
|
<th style="width: 25%">Options</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody>
|
|
|
|
<tr >
|
|
<td>1</td>
|
|
<td class="danger" title="Mandatory"><code>comment</code></td>
|
|
<td >
|
|
Text</td>
|
|
<td >
|
|
Comment
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>2</td>
|
|
<td ><code>comment_type</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment Type
|
|
|
|
</td>
|
|
<td>
|
|
<pre>Email
|
|
Chat
|
|
Phone
|
|
SMS
|
|
Created
|
|
Submitted
|
|
Cancelled
|
|
Assigned
|
|
Assignment Completed
|
|
Comment
|
|
Workflow
|
|
Label
|
|
Attachment
|
|
Attachment Removed</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>3</td>
|
|
<td ><code>comment_by</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment By
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>4</td>
|
|
<td ><code>comment_by_fullname</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment By Fullname
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>5</td>
|
|
<td ><code>comment_date</code></td>
|
|
<td >
|
|
Date</td>
|
|
<td >
|
|
Comment Date
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>6</td>
|
|
<td ><code>comment_time</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment Time
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>7</td>
|
|
<td ><code>comment_doctype</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment Doctype
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>8</td>
|
|
<td ><code>comment_docname</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Comment Docname
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>9</td>
|
|
<td ><code>post_topic</code></td>
|
|
<td >
|
|
Data</td>
|
|
<td >
|
|
Post Topic
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>10</td>
|
|
<td ><code>unsubscribed</code></td>
|
|
<td >
|
|
Check</td>
|
|
<td >
|
|
Unsubscribed
|
|
|
|
</td>
|
|
<td></td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>11</td>
|
|
<td ><code>reference_doctype</code></td>
|
|
<td >
|
|
Link</td>
|
|
<td >
|
|
Reference DocType
|
|
|
|
</td>
|
|
<td>
|
|
|
|
|
|
|
|
|
|
<a href="https://frappe.github.io/frappe/current/models/core/doctype">DocType</a>
|
|
|
|
|
|
|
|
</td>
|
|
</tr>
|
|
|
|
<tr >
|
|
<td>12</td>
|
|
<td ><code>reference_name</code></td>
|
|
<td >
|
|
Dynamic Link</td>
|
|
<td >
|
|
Reference Name
|
|
<p class="text-muted small">
|
|
Reference DocType and Reference Name are used to render a comment as a link (href) to a Doc.</p>
|
|
</td>
|
|
<td>
|
|
<pre>reference_doctype</pre>
|
|
</td>
|
|
</tr>
|
|
|
|
</tbody>
|
|
</table>
|
|
|
|
|
|
<hr>
|
|
<h3>Controller</h3>
|
|
<h4>frappe.core.doctype.comment.comment</h4>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<h3 style="font-weight: normal;">Class <b>Comment</b></h3>
|
|
|
|
<p style="padding-left: 30px;"><i>Inherits from frappe.model.document.Document</i></h4>
|
|
|
|
<div class="docs-attr-desc"><p>Comments are added to Documents via forms or views like blogs etc.</p>
|
|
</div>
|
|
<div style="padding-left: 30px;">
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="after_insert" href="#after_insert" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>after_insert</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Send realtime updates</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_comments_from_parent" href="#get_comments_from_parent" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_comments_from_parent</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p><span class="text-muted">No docs</span></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="get_feed" href="#get_feed" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>get_feed</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Returns feed HTML from Comment.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_trash" href="#on_trash" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_trash</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Removes from <code>_comments</code> in parent Document</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="on_update" href="#on_update" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>on_update</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Updates <code>_comments</code> property in parent Document.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="update_comment_in_doc" href="#update_comment_in_doc" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>update_comment_in_doc</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Updates <code>_comments</code> (JSON) property in parent Document.
|
|
Creates a column <code>_comments</code> if property does not exist.</p>
|
|
|
|
<p><code>_comments</code> format</p>
|
|
|
|
<pre><code>{
|
|
"comment": [String],
|
|
"by": [user],
|
|
"name": [Comment Document name]
|
|
}
|
|
</code></pre>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="update_comments_in_parent" href="#update_comments_in_parent" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>update_comments_in_parent</b>
|
|
<i class="text-muted">(self, _comments)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Updates <code>_comments</code> property in parent Document with given dict.</p>
|
|
|
|
<p><strong>Parameters:</strong></p>
|
|
|
|
<ul>
|
|
<li><strong><code>_comments</code></strong> - Dict of comments.</li>
|
|
</ul>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="validate" href="#validate" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
<b>validate</b>
|
|
<i class="text-muted">(self)</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Raise exception for more than 50 comments.</p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
</div>
|
|
<hr>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<p class="docs-attr-name">
|
|
<a name="frappe.core.doctype.comment.comment.on_doctype_update" href="#frappe.core.doctype.comment.comment.on_doctype_update" class="text-muted small">
|
|
<i class="icon-link small" style="color: #ccc;"></i></a>
|
|
frappe.core.doctype.comment.comment.<b>on_doctype_update</b>
|
|
<i class="text-muted">()</i>
|
|
</p>
|
|
<div class="docs-attr-desc"><p>Add index to <code>tabComment</code> <code>(comment_doctype, comment_name)</code></p>
|
|
</div>
|
|
<br>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
<!-- autodoc -->
|
|
<!-- jinja -->
|
|
<!-- static --> |