# Bug¶

class bugsy.Bug(bugsy=None, **kwargs)[source]

This represents a Bugzilla Bug

OS

Property for getting or setting the OS that the bug occured on

>>> bug.OS
"All"

__init__(bugsy=None, **kwargs)[source]

Defaults are set if there are no kwargs passed in. To pass in a dict create the Bug object like the following

Parameters: bugsy – Bugsy instance to use to connect to Bugzilla.
>>> bug = Bug(**myDict)

__weakref__

list of weak references to the object (if defined)

add_comment(comment)[source]

Adds a comment to a bug. If the bug object does not have a bug ID (ie you are creating a bug) then you will need to also call put on the Bugsy class.

>>> bug.add_comment("I like sausages")
>>> bugzilla.put(bug)


If it does have a bug id then this will immediately post to the server

>>> bug.add_comment("I like eggs too")


assigned_to

Property for getting the bug assignee

>>> bug.assigned_to
"automatedtester@mozilla.com"

blocks

Property to get the bug numbers that block on the current bug. It returns multiple bug numbers in a list.

>>> bug.blocks
[123456, 678901]

cc

Property to get the cc list for the bug. It returns emails for people

>>> bug.cc
[u'dburns@mozilla.com', u'automatedtester@mozilla.com']

component

Property for getting the bug component

>>> bug.component
General

depends_on

Property to get the bug numbers that depend on the current bug. It returns multiple bug numbers in a list.

>>> bug.depends_on
[123456, 678901]

get_comments()[source]

Returns a list of Comment instances.

id

Property for getting the ID of a bug.

>>> bug.id
123456

keywords

Property to get the keywords list for the bug. It returns multiple keywords in a list.

>>> bug.keywords
[u"ateam-marionette-runner", u"regression"]

platform

Property for getting the bug platform

>>> bug.platform
"ARM"

product

Property for getting the bug product

>>> bug.product
Core

resolution

Property for getting or setting the bug resolution

>>> bug.resolution
"FIXED"

status

Property for getting or setting the bug status

>>> bug.status
"REOPENED"

summary

Property for getting and setting the bug summary

>>> bug.summary
"I like cheese"

to_dict()[source]

Return the raw dict that is used inside this object

update()[source]

Update this object with the latest changes from Bugzilla

>>> bug.status
'NEW'
#Changes happen on Bugzilla
>>> bug.update()
>>> bug.status
'FIXED'

version

Property for getting the bug platform

>>> bug.version
"TRUNK"

class bugsy.BugException(msg, error_code=None)[source]

If we try do something that is not allowed to a bug then this error is raised