def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}") return FindListCommand(self.connection, request, Type).execute() # for typ in json_obj["_embedded"]["elements"]: # yield Type(typ) except RequestError as re: raise BusinessError("Error finding all time entries") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}") return FindListCommand(self.connection, request, Status).execute() # for status in json_obj["_embedded"]["elements"]: # yield Status(status) except RequestError as re: raise BusinessError("Error finding all statuses") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.project.id}/types") return FindListCommand(self.connection, request, Type).execute() # for tEntry in json_obj["_embedded"]["elements"]: # yield Type(tEntry) except RequestError as re: raise BusinessError("Error finding work package types") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}") return FindListCommand(self.connection, request, HelpText).execute() # for help_text in json_obj['_embedded']['elements']: # yield HelpText(help_text) except RequestError as re: raise BusinessError("Error finding all grids") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.work_package.id}/attachments") return FindListCommand(self.connection, request, Attachment).execute() # for attachment in json_obj["_embedded"]["elements"]: # yield att.Attachment(attachment) except RequestError as re: raise BusinessError(f"Error getting the list of attachments of the work_package: {self.work_package.subject}") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}") return FindListCommand(self.connection, request, class_type=Attachment).execute() # for attachment in json_obj["_embedded"]["elements"]: # yield att.Attachment(attachment) except RequestError as re: raise BusinessError("Error finding all attachments") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/available_projects") return FindListCommand(self.connection, request, Project).execute() # for tEntry in json_obj['_embedded']['elements']: # yield p.Project(tEntry) except RequestError as re: raise BusinessError("Error finding the available memberships") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.project.id}/versions") return FindListCommand(self.connection, request, Version).execute() # for tEntry in json_obj["_embedded"]["elements"]: # yield v.Version(tEntry) except RequestError as re: raise BusinessError("Error finding all time entries") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.project.id}/available_responsibles") return FindListCommand(self.connection, request, User).execute() # for tEntry in json_obj["_embedded"]["elements"]: # yield usr.User(tEntry) except RequestError as re: raise BusinessError(f"Error finding responsible of project: {self.project.name}") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.project.id}/budgets") return FindListCommand(self.connection, request, Budget).execute() # for budget in json_obj["_embedded"]["elements"]: # yield Budget(budget) except RequestError as re: raise BusinessError( f"Error finding budgets by id: {self.project.name}") from re
def execute(self): try: request = GetRequest(self.connection, f"{self.CONTEXT}/{self.context}") return FindListCommand(self.connection, request, Project).execute() # for project in json_obj["_embedded"]["elements"]: # yield p.Project(project) except RequestError as re: raise BusinessError( f"Error finding available projects for work package {self.work_package.id}" ) from re
def execute(self): try: request = GetRequest( self.connection, str(URL(f"{self.CONTEXT}", [Filters(self.filters)]))) return FindListCommand(self.connection, request, Membership).execute() # for membership in json_obj['_embedded']['elements']: # yield mem.Membership(membership) except RequestError as re: raise BusinessError("Error finding all memberships") from re
def execute(self): try: request = GetRequest( self.connection, str(URL(f"{self.CONTEXT}", [Filters(self.filters)]))) return FindListCommand(self.connection, request, Principal).execute() # for principal in json_obj["_embedded"]["elements"]: # yield p.Principal(principal) except RequestError as re: raise BusinessError("Error finding all principals") from re
def execute(self): try: request = GetRequest(self.connection, str(URL(f"{self.CONTEXT}/schemas", [ Filters( self.filters) ]))) return FindListCommand(self.connection, request, Schema).execute() # for schema in json_obj["_embedded"]["elements"]: # yield Schema(schema) except RequestError as re: raise BusinessError(f"Error finding all schemas by filters: {self.filters}") from re
def execute(self): try: request = GetRequest(self.connection, str(URL(f"{self.CONTEXT}", [ Filters([ Filter("spentOn", "<>d", [self.start_date, self.end_date])]) ]))) return FindListCommand(self.connection, request, TimeEntry).execute() except RequestError as re: raise BusinessError(f"Error finding time entries between {self.start_date} and {self.end_date}") from re
def execute(self): try: request = GetRequest(self.connection, str(URL(f"{self.CONTEXT}", [ Filters( self.filters) ]))) return FindListCommand(self.connection, request, Query).execute() # for tEntry in json_obj["_embedded"]["elements"]: # yield Query(tEntry) except RequestError as re: raise BusinessError(f"Error finding all queries with filters: {self.filters}") from re
def execute(self): try: request = GetRequest( self.connection, f"{self.CONTEXT}/{self.work_package.id}/available_watchers") return FindListCommand(self.connection, request, User).execute() # for watcher in json_obj["_embedded"]["elements"]: # yield usr.User(watcher) except RequestError as re: raise BusinessError( f"Error finding available watchers for work package {self.work_package.id}" ) from re
def execute(self): try: request = GetRequest( self.connection, f"{self.CONTEXT}/{self.project.id}/categories") return FindListCommand(self.connection, request, Category).execute() # for category in json_obj["_embedded"]["elements"]: # yield Category(category) except RequestError as re: raise BusinessError( f"Error finding categories by project: {self.project.name}" ) from re
def execute(self): try: request = GetRequest( self.connection, str( URL(f"{self.CONTEXT}", [URLParameter("sortBy", self.sort_by)]))) return FindListCommand(self.connection, request, Document).execute() # for document in json_obj["_embedded"]["elements"]: # yield Document(document) except RequestError as re: raise BusinessError("Error finding all documents") from re
def execute(self): try: request = GetRequest( self.connection, f"{self.CONTEXT}{self.work_package.id}/relations") return FindListCommand(self.connection, request, Relation).execute() # for relation in json_obj["_embedded"]["elements"]: # yield rel.Relation(relation) except RequestError as re: raise BusinessError( f"Error finding relations for work package {self.work_package.id}" ) from re
def execute(self): try: request = GetRequest( self.connection, f"{self.CONTEXT}{self.work_package.id}/activities") return FindListCommand(self.connection, request, Activity).execute() # for activity in json_obj["_embedded"]["elements"]: # yield act.Activity(activity) except RequestError as re: raise BusinessError( f"Error finding activities for work package {self.work_package.id}" ) from re
def execute(self): try: request = GetRequest(connection=self.connection, context=str( URL(f"{self.CONTEXT}", [ Filters(self.filters), URLParameter("sortBy", self.sort_by) ]))) return FindListCommand(self.connection, request, New).execute() # for news in json_obj['_embedded']['elements']: # yield New(news) except RequestError as re: raise BusinessError("Error finding all news") from re
def execute(self): try: request = GetRequest( self.connection, str( URL(f"{self.CONTEXT}", [ Filters(self.filters), URLParameter("sortBy", self.sort_by) ]))) return FindListCommand(self.connection, request, Grid).execute() # for grid in json_obj["_embedded"]["elements"]: # yield Grid(grid) except RequestError as re: raise BusinessError("Error finding all grids") from re
def execute(self): try: request = GetRequest( self.connection, str( URL(f"{self.CONTEXT}", [ Filters(self.filters), URLParameter("sortBy", self.sort_by) ]))) return FindListCommand(self.connection, request, TimeEntry).execute() except RequestError as re: raise BusinessError("Error finding all time entries") from re
def execute(self): try: request = GetRequest( self.connection, str( URL(f"{self.CONTEXT}/available_parent_projects", [ Filters(self.filters), URLParameter("of", self.of), URLParameter("sortBy", self.sort_by) ]))) return FindListCommand(self.connection, request, Project).execute() # for tEntry in json_obj["_embedded"]["elements"]: # yield p.Project(tEntry) except RequestError as re: raise BusinessError( "Error finding parent project candidates") from re
def execute(self): try: request = GetRequest( self.connection, str( URL(f"{self.CONTEXT}", [ Filters(self.filters), URLParameter("sortBy", self.sort_by), URLParameter("groupBy", self.group_by), URLParameter("showSums", self.show_sums) ]))) return FindListCommand(self.connection, request, WorkPackage).execute() # json_obj = request.execute() # for work_package in json_obj["_embedded"]["elements"]: # yield wp.WorkPackage(work_package) except RequestError as re: raise BusinessError("Error finding all work packages") from re
def execute(self): try: request = GetRequest(connection=self.connection, context=str(URL(f"{self.CONTEXT}" f"{self.work_package.id}/available_relation_candidates", [ Filters( self.filters), URLParameter ("query", self.query), URLParameter ("type", self.type) ]))) return FindListCommand(self.connection, request, Relation).execute() # for relation in json_obj["_embedded"]["elements"]: # yield rel.Relation(relation) except RequestError as re: raise BusinessError(f"Error finding relation candidates for work package {self.work_package.id}") from re