Beispiel #1
0
 def get_user(userid):
     user = None
     try:
         user = DAL_User.getuser(userid)
     except Exception as ex:
         print(ex)
     return user
 def get_projectversion_pms(projectversionid):
     allusersList=[(user.id, user.last_name + user.first_name) for user in DAL_User.getallusers().order_by("id") if user.id>1]
     result=list()
     for user in allusersList:
         temp=dict()
         temp["text"]=user[1]
         temp["memberid"]=user[0]
         if projectversionid!=0:
             projectversion=DAL_ProjectVersion.get_projectversion(projectversionid)
             if user[0] in eval(projectversion.PVPM):
                 temp["selected"]=1
             else:
                 temp["selected"]=0
         else:
             temp["selected"]=0
         result.append(temp)
     return str(result).replace("u'","'")
Beispiel #3
0
 def get_testproject_lead(testprojectid):
     allusersList = [(user.id, user.last_name + user.first_name)
                     for user in DAL_User.getallusers().order_by("id")
                     if user.id > 1]
     result = list()
     for user in allusersList:
         temp = dict()
         temp["text"] = user[1]
         temp["memberid"] = user[0]
         if testprojectid != 0:
             testproject = DAL_TestProject.get_testproject(testprojectid)
             if user[0] == testproject.TPProjectLead:
                 temp["selected"] = 1
             else:
                 temp["selected"] = 0
         else:
             temp["selected"] = 0
         result.append(temp)
     return str(result).replace("u'", "'")
Beispiel #4
0
 def getsubmition_all_emaillist(testsubmitionid):
     allusersList = [(user.id, user.last_name + user.first_name)
                     for user in DAL_User.getallusers().order_by("id")
                     if user.id > 1]
     result = list()
     for user in allusersList:
         temp = dict()
         temp["text"] = user[1]
         temp["memberid"] = user[0]
         if testsubmitionid != 0:
             testsubmition = DAL_TestSubmition.gettestsubmition(
                 testsubmitionid)
             if user[0] in eval(testsubmition.TPSCC):
                 temp["selected"] = 1
             else:
                 temp["selected"] = 0
         else:
             temp["selected"] = 0
         result.append(temp)
     return str(result).replace("u'", "'")
Beispiel #5
0
 def get_testjob_testers(testjobid):
     testers = DAL_User.getuserbygroup("QA")
     result=list()
     for tester in testers:
         temp=dict()
         temp["text"]=tester.last_name + tester.first_name
         temp["memberid"]=tester.id
         if testjobid!=0:
             testjob=DAL_TestJob.gettestjob(testjobid)
             if "[" in testjob.TJTester:
                 testerlist=eval(testjob.TJTester.replace("[","").replace("']","").replace("u'","").replace("'","")+",")
             else:
                 testerlist=eval(testjob.TJTester)
             if tester.id in testerlist:
                 temp["selected"]=1
             else:
                 temp["selected"]=0
         else:
             temp["selected"]=0
         result.append(temp)
     return str(result).replace("u'","'")
 def get_all_testers():
     testers = DAL_User.getuserbygroup("QA")
     return [(tester.id, tester.last_name + tester.first_name) for tester in testers]
Beispiel #7
0
 def getalluseremaillist():
     emaillist = list()
     for user in DAL_User.getallusers():
         emaillist.append(user.email)
     return emaillist
Beispiel #8
0
 def getusersbygroup(usergroup):
     return DAL_User.getuserbygroup(usergroup)
Beispiel #9
0
 def getallusers():
     allusersList = [(user.id, user.last_name + user.first_name)
                     for user in DAL_User.getallusers().order_by("username")
                     if user.id > 1]
     return allusersList
Beispiel #10
0
 def getavaliblesubmitors():
     submitiors = DAL_User.getuserbygroup("Dev")
     return [(developer.id, developer.last_name + developer.first_name)
             for developer in submitiors]
Beispiel #11
0
 def getavalibledevelopers():
     developers = DAL_User.getuserbygroup("Dev")
     return [(developer.id, developer.last_name + developer.first_name)
             for developer in developers]