Workitem

class rtcclient.workitem.Workitem(url, rtc_obj, workitem_id=None, raw_data=None)[source]

A wrapped class for managing all related resources of the workitem

Parameters:
  • url – the workitem url
  • rtc_obj – a reference to the rtcclient.client.RTCClient object
  • (default is None) (workitem_id) – the id of the workitem, which will be retrieved if not specified
  • raw_data – the raw data ( OrderedDict ) of the request response
addComment(msg=None)[source]

Add a comment to this workitem

Parameters:msg – comment message
Returns:the rtcclient.models.Comment object
Return type:rtcclient.models.Comment
getAction(action_name)[source]

Get the rtcclient.models.Action object by its name

Parameters:action_name – the name/title of the action
Returns:the rtcclient.models.Action object
Return type:rtcclient.models.Action
getActions()[source]

Get all rtcclient.models.Action objects of this workitem

Returns:a list contains all the rtcclient.models.Action objects
Return type:list
getCommentByID(comment_id)[source]

Get the rtcclient.models.Comment object by its id

Note: the comment id starts from 0

Parameters:comment_id – the comment id (integer or equivalent string)
Returns:the rtcclient.models.Comment object
Return type:rtcclient.models.Comment
getComments()[source]

Get all rtcclient.models.Comment objects in this workitem

Returns:a list contains all the rtcclient.models.Comment objects
Return type:list
getSubscribers()[source]

Get subscribers of this workitem

Returns:a list contains all the rtcclient.models.Member objects
Return type:list