Comment

Comment is short text (with reference to author and date/time mark) assigned to any SimDM concept (including another comment - response message).

comment_list_types

returns list of types acceptable for comments in target model

QUERY_FUNCTION comment_list_types: LIST OF STRING


comment_create

creates new user's comment attached to an item in current PBS according to provided input

To call the query logged in user shall be associated with a person granted with reading privileges over commented item (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION comment_create(subject: v_comment): v_comment

Parameter:
subject input parameter of the comment, see v_comment
subject.commented_item is required - instance id of commented item
some attributes of the input are ignored, like the following:
  • subject.item.instance_id - generated
  • subject.item.cancelled - set to FALSE
  • subject.item.creator - set to logged in user
  • subject.item.last_changed - set to date/time of the call
  • subject.item.last_editor - set to logged in user
  • subject.item.comments - unset
  • subject.item.events - is populated with a creation event

Returns actual attributes of the added comment (see v_comment)


comment_get

gets data of a comment specified by its instance id

To call the query logged in user shall be associated with a person granted with reader privileges over whole pbs (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION comment_get(id: INTEGER): v_comment

Parameter:
id id of the comment instance

Returns actual data of the comment (see v_comment)


comment_list

lists data of comments specified by list of their instance id. Normally source of the list is v_pbs returned by pbs_get

To call the query logged in user shall be associated with a person granted with reader privileges over whole pbs (READER_TYPE, EDITOR_TYPE, ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION comment_list(ids: LIST OF INTEGER): LIST OF v_comment

Parameter:
ids list of interesting properties instance id-s

Returns list of actual data of the required properties (see v_comment)


comment_select

properties search is not implemented in current realize
QUERY_FUNCTION comment_select(
      subj              : specified_master_item;
      author            : INTEGER;
      after,
      before            : STRING)  :  LIST OF v_comment
Parameters:
subj (optional) instance id and entity type of commented item
author (optional) instance id of person who made the comment(s)
after, before (optional) date/time in format "YYYY/MM/DD hh:mm:ss"

Returns list of found comments (see v_comment)


comment_update

updates content/type of the comment

To call the query logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for the person or group where the person is registered)

QUERY_FUNCTION comment_update(subject: v_comment): v_comment

Parameter:
subject updated data of the comment definition to be updated in model (see v_comment)
Target instance specified by subject.item.instance_id

The following attributes are ignored:

  • subject.item.introduced - is leaved as before
  • subject.item.creator - is leaved as before
  • subject.item.last_changed - set to current date/time
  • subject.item.last_editor - set to calling user
  • subject.item.comments - is leaved as before
  • subject.item.event - is added with update event

Returns actual data of the updated comment (see v_comment)


comment_remove

tries to remove or cancel comment specified by instance db ID. The comment is declared as cancelled. The instance of the comment can be even removed if no answer for done

To call the query logged in user shall be associated with a person granted with administrative privileges over whole pbs (ADMIN_TYPE for the person or group where the person is registered) or be author of the comment

QUERY_FUNCTION comment_remove(id: INTEGER): BOOLEAN

Parameter:
id instance id of the comment to be cancelled

Returns TRUE if the comment is deleted (was not used), FALSE if just cancelled

Back to Home page