|
@@ -176,6 +176,10 @@ class DRNClerkBot(Task): |
|
|
body = re.sub(re_id2, repl.format(id_), body) |
|
|
body = re.sub(re_id2, repl.format(id_), body) |
|
|
case = _Case(id_, title, status) |
|
|
case = _Case(id_, title, status) |
|
|
cases.append(case) |
|
|
cases.append(case) |
|
|
|
|
|
else: |
|
|
|
|
|
if case.title != title: |
|
|
|
|
|
self.update_case_title(conn, id_, title) |
|
|
|
|
|
case.title = title |
|
|
case.body, case.old = body, old |
|
|
case.body, case.old = body, old |
|
|
|
|
|
|
|
|
def select_next_id(self, conn): |
|
|
def select_next_id(self, conn): |
|
@@ -208,6 +212,12 @@ class DRNClerkBot(Task): |
|
|
return option |
|
|
return option |
|
|
return self.STATUS_UNKNOWN |
|
|
return self.STATUS_UNKNOWN |
|
|
|
|
|
|
|
|
|
|
|
def update_case_title(self, conn, id_, title): |
|
|
|
|
|
"""Update a case title in the database.""" |
|
|
|
|
|
query = "UPDATE case SET case_title = ? WHERE case_id = ?" |
|
|
|
|
|
with conn.cursor() as cursor: |
|
|
|
|
|
cursor.execute(query, (title, id_)) |
|
|
|
|
|
|
|
|
def clerk(self): |
|
|
def clerk(self): |
|
|
"""Actually go through cases and modify those to be updated.""" |
|
|
"""Actually go through cases and modify those to be updated.""" |
|
|
notices = [] |
|
|
notices = [] |
|
|