weboob.capabilities.bugtracker

exception weboob.capabilities.bugtracker.IssueError

Bases: weboob.capabilities.base.UserError

Raised when there is an error with an issue.

class weboob.capabilities.bugtracker.Project(id, name, url=None)

Bases: weboob.capabilities.base.BaseObject

Represents a project.
Variables:
  • name – (unicode) Name of the project
  • members – (list) Members of projects
  • versions – (list) List of versions available for this project
  • trackers – (list) All trackers
  • categories – (list) All categories
  • statuses – (list) Available statuses for issues
  • priorities – (list) Available priorities for issues
find_status(name)

Find a status from a name.

Parameters:name (str) – Name of status
Return type:Status
find_user(id, name)

Find a user from its ID.

If not found, create a User with the specified name.

Parameters:
  • id (str) – ID of user
  • name (str) – Name of user
Return type:

User

find_version(id, name)

Find a version from an ID.

If not found, create a Version with the specified name.

Parameters:
  • id (str) – ID of version
  • name (str) – Name of version
Return type:

Version

class weboob.capabilities.bugtracker.User(id, name, url=None)

Bases: weboob.capabilities.base.BaseObject

User.
Variables:name – (unicode) Name of user
class weboob.capabilities.bugtracker.Version(id, name, url=None)

Bases: weboob.capabilities.base.BaseObject

Version of a project.
Variables:name – (unicode) Name of version
class weboob.capabilities.bugtracker.Status(id, name, value, url=None)

Bases: weboob.capabilities.base.BaseObject

Status of an issue.

VALUE_ constants are the primary status types.

Variables:
  • name – (unicode) Name of status
  • value – (int, long) Value of status (constants VALUE_*)
VALUE_NEW = 0
VALUE_PROGRESS = 1
VALUE_REJECTED = 3
VALUE_RESOLVED = 2
class weboob.capabilities.bugtracker.Attachment(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Attachment of an issue.
Variables:filename – (unicode) Filename
class weboob.capabilities.bugtracker.Change(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

A change of an update.
Variables:
  • field – (unicode) What field has been changed
  • last – (unicode) Last value of field
  • new – (unicode) New value of field
class weboob.capabilities.bugtracker.Update(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Represents an update of an issue.
Variables:
  • author – (User) Author of update
  • date – (date, datetime) Date of update
  • hours – (timedelta) Time activity
  • message – (unicode) Log message
  • attachments – (list, tuple) Files attached to update
  • changes – (list, tuple) List of changes
class weboob.capabilities.bugtracker.Issue(id=u'', url=NotLoaded, backend=None)

Bases: weboob.capabilities.base.BaseObject

Represents an issue.
Variables:
  • project – (Project) Project of this issue
  • title – (unicode) Title of issue
  • body – (unicode) Text of issue
  • creation – (date, datetime) Date when this issue has been created
  • updated – (date, datetime) Date when this issue has been updated for the last time
  • start – (date, datetime) Date when this issue starts
  • due – (date, datetime) Date when this issue is due for
  • attachments – (list, tuple) List of attached files
  • history – (list, tuple) History of updates
  • author – (User) Author of this issue
  • assignee – (User) User assigned to this issue
  • tracker – (unicode) Name of the tracker
  • category – (unicode) Name of the category
  • version – (Version) Target version of this issue
  • status – (Status) Status of this issue
  • fields – (dict) Custom fields (key,value)
  • priority – (unicode) Priority of the issue
class weboob.capabilities.bugtracker.Query(id='', url=None)

Bases: weboob.capabilities.base.BaseObject

Query to find an issue.
Variables:
  • project – (unicode) Filter on projects
  • title – (unicode) Filter on titles
  • author – (unicode) Filter on authors
  • assignee – (unicode) Filter on assignees
  • version – (unicode) Filter on versions
  • category – (unicode) Filter on categories
  • status – (unicode) Filter on statuses
class weboob.capabilities.bugtracker.CapBugTracker

Bases: weboob.capabilities.base.Capability

Bug trackers websites.

create_issue(project)

Create an empty issue on the given project.

Parameters:project (Project) – project
Returns:the created issue
Return type:Issue
get_issue(id)

Get an issue from its ID.

Parameters:id – ID of issue
Return type:Issue
get_project(id)

Get a project from its ID.

Return type:Project
iter_issues(query)

Iter issues with optionnal patterns.

Parameters:query (Query) – query
Return type:iter[Issue]
iter_projects()

Iter projects.

Return type:iter[Project]
post_issue(issue)

Post an issue to create or update it.

Parameters:issue (Issue) – issue to create or update
remove_issue(issue)

Remove an issue.

Parameters:issue (Issue) – issue
update_issue(issue, update)

Add an update to an issue.

Parameters:
  • issue (Issue) – issue or id of issue
  • update (Update) – an Update object