Exemplo n.º 1
0
 def _refresh (self):
     sql = self._get_sql()
     self.sql_result = DB.fetchall_cacheable (sql)
     return True
Exemplo n.º 2
0
def get_org_id(mail = conf.USER):
    username = mail.split('@')[0]
    SQL = "select id from \"OrgChart2S.User\" u where u.Uid = '%s'" %(username)
    return DB.fetchall_cacheable(SQL)[0]['id']
Exemplo n.º 3
0
def get_manager(mail = conf.USER):
    username = mail.split('@')[0]
    SQL = "select uid,realname from \"OrgChart2S.User\" u where u.id = ( select Manager from \"OrgChart2S.User\" u where u.Uid = '%s' )" %(username)
    return DB.fetchall_cacheable(SQL)
Exemplo n.º 4
0
def get_direct_reports(mail = conf.USER):
    manager_id = get_org_id()
    SQL = "select uid,realname from \"OrgChart2S.User\" u where u.Manager = '%s'" %(manager_id)
    return DB.fetchall_cacheable(SQL)
Exemplo n.º 5
0
def get_user_id(username = conf.USER):
    SQL = "select userid from BugzillaS.profiles profiles where profiles.login_name = '%s'" %(username)
    return DB.fetchall_cacheable(SQL)[0]['userid']
Exemplo n.º 6
0
def get_product_id(product = conf.TASKS_PRODUCT):
    SQL = "select id from BugzillaS.products products where products.name = '%s'" %(product)
    return DB.fetchall_cacheable(SQL)[0]['id']