Exemplo n.º 1
0
 def team(self, teamName):
     """ Details for a team """
     self.validate(teamName)
     assignments = ListRequests.listRequestsByTeam(teamName)
     if assignments == None:
         assignments = []
     else:
         assignments = assignments.keys()
     self.validate(assignments)
     return self.templatepage("Team", team=teamName, requests=assignments)
Exemplo n.º 2
0
 def putAssignment(self, team, requestName):
     """ Assigns this request to this team """
     # see if it's already assigned
     team = urllib.unquote(team)
     if not team in ProdManagement.listTeams():
         raise cherrypy.HTTPError(404,"Cannot find this team")
     requestNamesAndIDs = ListRequests.listRequestsByTeam(team)
     if requestName in requestNamesAndIDs.keys():
         raise cherrypy.HTTPError(400,"Already assigned to this team")
     return ChangeState.assignRequest(requestName, team)
Exemplo n.º 3
0
 def putAssignment(self, team, requestName):
     """ Assigns this request to this team """
     # see if it's already assigned
     team = urllib.unquote(team)
     if not team in ProdManagement.listTeams():
         raise cherrypy.HTTPError(404, "Cannot find this team")
     requestNamesAndIDs = ListRequests.listRequestsByTeam(team)
     if requestName in requestNamesAndIDs.keys():
         raise cherrypy.HTTPError(400, "Already assigned to this team")
     return ChangeState.assignRequest(requestName, team)
Exemplo n.º 4
0
 def getAssignment(self, teamName=None, request=None):
     """ If a team name is passed in, get all assignments for that team.
     If a request is passed in, return a list of teams the request is
     assigned to
     """
     # better to use ReqMgr/RequestDB/Interface/ProdSystem/ProdMgrRetrieve?
     #requestIDs = ProdMgrRetrieve.findAssignedRequests(teamName)
     # Maybe now assigned to team is same as assigned to ProdMgr
     result = []
     if teamName != None:
         requestIDs = ListRequests.listRequestsByTeam(teamName, "assigned").values()
         requests = [GetRequest.getRequest(reqID) for reqID in requestIDs]
         # put highest priorities first
         requests.sort(key=lambda r: r['RequestPriority'], reverse=True)
         # return list of tuples, since we need sorting
         result = [[req['RequestName'], req['RequestWorkflow']] for req in requests]
     elif request != None:
         result = GetRequest.getAssignmentsByName(request)
     return result
Exemplo n.º 5
0
 def getAssignment(self, teamName=None, request=None):
     """ If a team name is passed in, get all assignments for that team.
     If a request is passed in, return a list of teams the request is
     assigned to
     """
     # better to use ReqMgr/RequestDB/Interface/ProdSystem/ProdMgrRetrieve?
     #requestIDs = ProdMgrRetrieve.findAssignedRequests(teamName)
     # Maybe now assigned to team is same as assigned to ProdMgr
     result = []
     if teamName != None:
         requestIDs = ListRequests.listRequestsByTeam(teamName, "assigned").values()
         requests = [GetRequest.getRequest(reqID) for reqID in requestIDs]
         # put highest priorities first
         requests.sort(key=lambda r: r['RequestPriority'], reverse=True)
         # return list of tuples, since we need sorting
         result = [[req['RequestName'], req['RequestWorkflow']] for req in requests]
     elif request != None:
         result = GetRequest.getAssignmentsByName(request)
     return result
Exemplo n.º 6
0
 def getRequestsByStatusAndTeam(self, teamName, status):
     """ Get a list of request names with the given team and status.
     """
     requestNames = ListRequests.listRequestsByTeam(teamName, status).keys()
     return requestNames
Exemplo n.º 7
0
 def getRequestsByStatusAndTeam(self, teamName, status):
     """ Get a list of request names with the given team and status.
     """
     requestNames = ListRequests.listRequestsByTeam(teamName, status).keys()
     return requestNames