RecordComment
class flow_api.record_comment.RecordComment(select=None, cls=None, init=None, by='id', allow_normal=True, allow_deleted=False, commit=False, assignee_identity_id=<class 'flow_api.system.NotSet'>, body=<class 'flow_api.system.NotSet'>, parent_comment_id=<class 'flow_api.system.NotSet'>, record_id=<class 'flow_api.system.NotSet'>, resolved_at=<class 'flow_api.system.NotSet'>, debug=False)
Base class: Row
A threaded comment attached to any record.
Generic, reusable discussion trail on every record type (mirrors the
record_metadata "attaches to any record" subrecord pattern). A comment
can additionally act as a lightweight question by carrying an
assignee_identity_id and being marked resolved (resolved_at /
resolved_by). Per-viewer read state lives in the sibling
record_comment_read subrecord (store-when-read; a missing row means the
comment is unread for that identity).
Permission contract:
- create: caller needs READ on the parent record;
author_identity_idis always forced to the acting identity (never taken from the request body). - read (by-id + list): caller needs READ on the parent record.
- update / delete: the comment's author, OR a caller with UPDATE on the
parent record, OR an internal caller.
author_identity_idandrecord_idare immutable; settingresolved_atstampsresolved_bywith the acting identity (clearing it clears both).
Comments ARE part of a record's export: the base record table declares a
record_comment_plain_list_record_id fragment in its additional_exports
(see resources/record.py), so a comment thread is carried in a bundle
release/install and git-synced with its parent record. The transported fields
are body, created_at and resolved_at (chronologically ordered).
The four FK columns holding source-workspace-local identity/self UUIDs
(author_identity_id, assignee_identity_id, parent_comment_id,
resolved_by) are excluded from transport: on import author_identity_id
is re-derived to the importing identity by mutate_body_insert_cb (no id
remap), and assignee re-link + reply threading are a deliberate follow-up
(they need by-name identity resolution and a within-export local key).
Because record_comment has no UniqueConstraint, an import
delete-and-recreates the parent's comment list to match the exported set.
Parameters
| Name | Type | Description |
|---|---|---|
| allow_deleted | bool | |
| allow_normal | bool | |
| assignee_identity_id | Union | Optional identity the comment is assigned to (turns the comment into a lightweight question). |
| body | Union | The comment body (markdown). |
| by | str | |
| cls | Optional | |
| commit | bool | |
| debug | bool | if set, the content of the data being written will be logged. |
| init | Optional | |
| parent_comment_id | Union | Optional parent comment for reply threading. |
| record_id | Union | Reference to the record this comment is attached to. |
| resolved_at | Union | When the comment was resolved (null while open). Setting this stamps resolved_by. |
| select | Optional |