tcms.bugs.api module¶
- tcms.bugs.api.add_attachment(bug_id, filename, b64content, **kwargs)[source]¶
- RPC Bug.add_attachment(bug_id, filename, b64content)
Add attachment to the given Bug.
- tcms.bugs.api.add_comment(bug_id, comment, user_id=None, submit_date=None, **kwargs)[source]¶
- RPC Bug.add_comment(bug_id, comment)
Add comment to selected Bug.
- Parameters:
bug_id (int) – PK of a Bug object
comment (str) – The text to add as a comment
user_id (int) – Override comment
userfield. Only super-user can use this!submit_date (datetime.datetime) – Override comment
submit_datefield. Only super-user can use this!**kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
- Returns:
Serialized
django_comments.models.Commentobject- Return type:
- Raises:
PermissionDenied – if missing django_comments.add_comment permission
Added in version 15.3.
- tcms.bugs.api.add_execution(bug_id, execution_id)[source]¶
- RPC Bug.add_execution(bug_id, execution_id)
Add TestExecution to the specified Bug.
- Parameters:
- Raises:
PermissionDenied – if missing bugs.add_bug_executions permission
Bug.DoesNotExist – if object specified by PK doesn’t exist
TestExecution.DoesNotExist – if object specified by PK doesn’t exist
Added in version 15.3.
- 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:
- 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.create(values, **kwargs)[source]¶
- RPC Bug.create(values)
Create a new Bug object and store it in the database.
- Parameters:
values (dict) – Field values for
tcms.bugs.models.Bug**kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
- Returns:
Serialized
tcms.bugs.models.Bugobject- Return type:
- Raises:
ValueError – if input values don’t validate
PermissionDenied – if missing bugs.add_bug permission
Added in version 15.3.
- 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.Bugobjects.- Return type:
- tcms.bugs.api.filter_canonical(query)[source]¶
- RPC Bug.filter_canonical(query)
Get a list of bugs where FKs are reported as IDs.
- Parameters:
query (dict) – Field lookups for
tcms.bugs.models.Bug- Returns:
List of serialized
tcms.bugs.models.Bugobjects.- Return type:
Added in version 15.3.
- tcms.bugs.api.get_comments(bug_id)[source]¶
- RPC Bug.get_comments(bug_id)
Get all comments for selected Bug.
Added in version 15.3.
- tcms.bugs.api.list_attachments(bug_id, **kwargs)[source]¶
- RPC Bug.list_attachments(bug_id)
List attachments for the given Bug.
- Parameters:
bug_id (int) – PK of Bug to inspect
**kwargs – Dict providing access to the current request, protocol, entry point name and handler instance from the rpc method
- Returns:
A list containing information and download URLs for attachements
- Return type:
- Raises:
Bug.DoesNotExist – if object specified by PK is missing
Added in version 15.3.
- 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:
- Raises:
PermissionDenied – if missing bugs.delete_bug_tags permission
DoesNotExist – if objects specified don’t exist
- tcms.bugs.api.severity_create(values)[source]¶
- RPC Severity.create(values)
Create a new Severity object and store it in the database.
- Parameters:
values (dict) – Field values for
tcms.bugs.models.Severity- Returns:
Serialized
tcms.bugs.models.Severityobject- Return type:
- Raises:
ValueError – if input values don’t validate
PermissionDenied – if missing bugs.add_severity permission
Added in version 15.2.
- tcms.bugs.api.severity_filter(query)[source]¶
- RPC Severity.filter(query)
Get list of bug severities.
- Parameters:
query (dict) – Field lookups for
tcms.bugs.models.Severity- Returns:
List of serialized
tcms.bugs.models.Severityobjects.- Return type:
Added in version 15.2.