def readTicketValue(name, tipe, default=0): if ticket.values.has_key(name): return tipe(ticket.values[name] or default) else: val = dbhelper.get_first_row( self.env, "SELECT * FROM ticket_custom where ticket=%s and name=%s", ticket.id, name) if val: return tipe(val[2] or default) return default
def readTicketValue(name, tipe, default=0): if ticket.values.has_key(name): return tipe(ticket.values[name] or default) else: val = dbhelper.get_first_row( self.env, "SELECT * FROM ticket_custom where ticket=%s and name=%s", ticket.id, name) if val: return tipe(val[2] or default) return default
def get_report_id_and_version(self, uuid): sql = "SELECT custom_report.id, custom_report.version FROM custom_report "\ "JOIN report ON report.id = custom_report.id " \ "WHERE uuid=%s" tpl = dbhelper.get_first_row(self.env, sql, uuid) return tpl or (None, 0)
def get_report_by_uuid(self, uuid): sql = "SELECT report.id,report.title FROM custom_report "\ "LEFT JOIN report ON custom_report.id=report.id "\ "WHERE custom_report.uuid=%s" return dbhelper.get_first_row(self.env, sql, uuid)
def get_report_id_and_version (self, uuid): sql = "SELECT custom_report.id, custom_report.version FROM custom_report "\ "JOIN report ON report.id = custom_report.id " \ "WHERE uuid=%s" tpl = dbhelper.get_first_row(self.env, sql, uuid) return tpl or (None, 0)
def get_report_by_uuid(self, uuid): sql = "SELECT report.id,report.title FROM custom_report "\ "LEFT JOIN report ON custom_report.id=report.id "\ "WHERE custom_report.uuid=%s" return dbhelper.get_first_row(self.env, sql,uuid)