tcms.bugs.api module

tcms.bugs.api.add_tag(bug_id, tag, **kwargs)[source]
RPC Bug.add_tag(bug_id, tag)

Add one tag to the specified Bug.

Parameters:
  • bug_id (int) – PK of Bug to modify

  • tag (str) – Tag name to add

  • **kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method

Raises:
  • PermissionDenied – if missing bugs.add_bug_tags permission

  • Bug.DoesNotExist – if object specified by PK doesn’t exist

  • Tag.DoesNotExist – if missing management.add_tag permission and tag doesn’t exist in the database!

tcms.bugs.api.filter(query)[source]
RPC Bug.filter(query)

Get list of bugs.

Parameters:

query (dict) – Field lookups for tcms.bugs.models.Bug

Returns:

List of serialized tcms.bugs.models.Bug objects.

Return type:

list

tcms.bugs.api.remove(query)[source]
RPC Bug.remove(bug_id)

Remove Bug object(s).

Parameters:

query (dict) – Field lookups for tcms.bugs.models.Bug

Raises:

PermissionDenied – if missing bugs.delete_bugtag permission

tcms.bugs.api.remove_tag(bug_id, tag)[source]
RPC Bug.remove_tag(bug_id, tag)

Remove tag from a Bug.

Parameters:
  • bug_id (int) – PK of Bug to modify

  • tag (str) – Tag name to remove

Raises:
  • PermissionDenied – if missing bugs.delete_bug_tags permission

  • DoesNotExist – if objects specified don’t exist