Skip to main content
Version: 12 - TBD

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_id is 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_id and record_id are immutable; setting resolved_at stamps resolved_by with the acting identity (clearing it clears both).

Comments are NOT part of a record's git export (no {name}_list entry in the parent's export serialization), so they are intentionally not git-synced.

Parameters

NameTypeDescription
allow_deletedbool
allow_normalbool
assignee_identity_idUnionOptional identity the comment is assigned to (turns the comment into a lightweight question).
bodyUnionThe comment body (markdown).
bystr
clsOptional
commitbool
debugboolif set, the content of the data being written will be logged.
initOptional
parent_comment_idUnionOptional parent comment for reply threading.
record_idUnionReference to the record this comment is attached to.
resolved_atUnionWhen the comment was resolved (null while open). Setting this stamps resolved_by.
selectOptional

Constants

RESOURCE = record_comment

Methods

add_record_comment_parent_comment_id

add_record_comment_read

assignee_identity_id_identity

author_identity_id_identity

clone

delete

duplicate

exists

export

get

get_dict

parent_comment_id_record_comment

record

record_comment_list_parent_comment_id

record_comment_read_list

resolved_by_identity

restore

save