Skip to main content

 Services

Web services from /about to /webhooks

comment

/members/{member}/comments/{commentid} [PATCH]

Description

Edits an existing comment.

This service can also be used to edit workflow steps but only the content and labels parameters are allowed.

Parameters

NameDescriptionRequiredTypeDefault value
assignedtoThe ID of the member to assign the task to – status/previous status MUST be setnostring
attachmentgroupThe group to get the attachments from (only used if draft is set from false to true)nostring
authoremailThe email address of the author (manager only or draft from non-member)nostring
authornameThe name of the author (manager only or draft from non-member)nostring
contentThe content of the commentnostring
contenttypeThe media type of the commentnomediatype
createdThe creation date of the comment in ISO-8601 e.g. 2010-10-25T12:26:00+10:00 (manager only)nodatetime
draftWhether the comment is a draftnoboolean
dueThe task due date and time in ISO-8601 format – status MUST be set. e.g. 2010-10-25T18:00:00+11:00nodatetime
fragmentThe URI fragment to move this comment to (only applies to uri parameter)nostringdefault
groupThe name of the group to move this comment tonostring
groupsA comma-separated list of group names the comment belongs to (ignored if comment is not the thread root or won't be after move)nostring
labelsA comma-separated list of label valuesnostring
moderatedIf true, the comment is to be moderatednoboolean
moverepliesIf true, replies created after this comment are also moved and, if groups specified, then groups are modified (if current user is not a manager or author contributor of reply, it is not moved)nobooleantrue
notifyThe notification behaviornonotifysilent
notify-asyncWhether emails are sent asynchronously (for slow email servers)nobooleanfalse
priorityThe priority for the task e.g. High, Medium, Low – status/previous status MUST be setnostring
propertiesA pipe-separated list of value pairs e.g. x=1|y=2|nostring
replyThe comment ID to make this comment a reply to (this also changes the title to the reply to title unless overridden using the title parameter)nolong
statusThe task status value, e.g. Opennostring
titleThe title of the commentnostring
typeThe type of commentnostring
uriThe URI ID to move this comment tonolong
urisComma-separated list of attachments as URI IDs with optional !fragmentsnostring
urlThe URL with optional #fragment to move this comment tonourl
urlsComma-separated list of attachments as URLs with optional #fragmentsnostring

No parameters are required, but parameters which are specified modify the comment accordingly. 

Permission

The member on the request needs to be a contributor or higher.

Response

<comment-modification [notification-email-delayed="true"|
                      notification-email-failed="true"]
                      [notify-param-ignored="true"]
                      [public="true"]>
  <comment id="123"
           discussionid="122"
           contentrole="Comment"
           created="2012-03-08T12:34:00+10:00"
           [status="Open"]
           [due="2012-03-10T18:00:00+10:00"]
           [priority="High"]
           [moderated="true"]>
    <title>Cavern stolen!</title>
    <author email="alibaba@fortythieves.com.au"> ... </author>
    <assignedto id="123" 
                date="2012-03-09T..."> ... </assignedto>
    <modifiedby id="456" 
                date="2012-03-09T..."> ... </modifiedby>
    <content id="789"
             type="text/plain">Sesame opened the door</content>
    <context fragment="2">
      <uri id="789"> ... </uri>
    </context>
    <attachment>
      <uri id="189"> ... </uri>
    </attachment>
    <attachment fragment="5">
      <uri id="289"> ... </uri>
    </attachment>
  </comment>
</comment-modification>

Error Handling

CodeCause / Description
0x1002Invalid email address
0x1303Only one of uri, url, group or replyto can be specified
0x1304The URL is invalid
0x1305The URL does not match a GroupURI
0x1306The Group is invalid
0x1307The assigned to member is invalid
0x1308The due date is invalid
0x1309The comment is archived
0x1311The object specified is not a comment
0x1317The replyto comment was not found
0x1318URI not found
0x1324Comment can't be a reply to itself
0x1326The content was invalid
0x1328The labels parameter is invalid
0x1329The priority parameter is invalid
0x1330The status parameter is invalid
0x6301If the group has no general discussion
0x6303Failed to edit comment
0x6306The replyto comment has no context URI
Created on , last edited on