def __init__(self, id, name, key, url, statuses, milestones, current_milestone=None): self.id = id self.name = name self.key = key self.url = url self.statuses = [classwrap(x, StatusSummary) for x in statuses] if statuses else None self.milestones = [classwrap(x, MilestoneSummary) for x in milestones] if milestones else None self.current_milestone = classwrap(current_milestone, MilestoneSummary)
def add_comment(self, comment): """ @since: 0.2.1 (Backlog R2010-10-28) """ comment = classwrap(comment, AddComment) ret = self.server.backlog.addComment(comment.serialize()) return Comment(**ret)
def __init__(self, id, name, due_date, statuses=None, burndown_chart=None): self.id = id self.name = name self.due_date = due_date self.statuses = [classwrap(x, StatusSummary) for x in statuses] if statuses else None self.burndown_chart = burndown_chart
def update_component(self, component): """ @since: 0.2.1 (Backlog R2010-03-31) """ component = classwrap(component, Component) ret = self.server.backlog.updateComponent(component.serialize()) return Component(**ret)
def update_version(self, version): """ @since: 0.2.1 (Backlog R2010-03-31) """ version = classwrap(version, UpdateVersion) ret = self.server.backlog.updateVersion(version.serialize()) return UpdateVersion(**ret)
def update_issue_type(self, issueType): """ @since: 0.2.1 (Backlog R2010-03-31) """ issueType = classwrap(issueType, IssueType) ret = self.server.backlog.updateIssueType(issueType.serialize()) return IssueType(**ret)
def __init__(self, type, content, updated_on, user, issue): self.type = classwrap(type, ActivityType) self.content = content self.updated_on = updated_on self.user = classwrap(user, User) self.issue = classwrap(issue, TimelineIssue)
def __init__(self, id, key, summary, description, priority): self.id = id self.key = key self.summary = summary self.description = description self.priority = classwrap(priority, Priority)
def create_issue(self, issue): issue = classwrap(issue, AddIssue) ret = self.server.backlog.createIssue(issue.serialize()) return Issue(**ret)
def switch_status(self, status): status = classwrap(status, UpdateStatus) ret = self.server.backlog.switchStatus(status.serialize()) return Issue(**ret)
def add_project(self, project): project = classwrap(project, AdminAddProject) ret = self.server.backlog.admin.addProject(project.serialize()) return AdminProject(**ret)
def add_user(self, user): user = classwrap(user, AdminAddUser) ret = self.server.backlog.admin.addUser(user.serialize()) return AdminUser(**ret)
def update_project_users(self, project_users): project_users = classwrap(project_users, AdminUpdateProjectUsers) ret = self.server.backlog.admin.updateProjectUsers(project_users.serialize()) return [AdminProjectUser(**x) for x in ret]
def delete_project_user(self, project_user): project_user = classwrap(project_user, AdminAddProjectUser) ret = self.server.backlog.admin.deleteProjectUser(project_user.serialize()) return [AdminProjectUser(**x) for x in ret]
def update_issue(self, issue): issue = classwrap(issue, UpdateIssue) ret = self.server.backlog.updateIssue(issue.serialize()) return Issue(**ret)