| @@ -270,13 +270,14 @@ class DRNClerkBot(Task): | |||||
| if len(case.body) - case.last_volunteer_size > 15000: | if len(case.body) - case.last_volunteer_size > 15000: | ||||
| if case.last_action != self.STATUS_NEEDASSIST: | if case.last_action != self.STATUS_NEEDASSIST: | ||||
| case.status = self.STATUS_NEEDASSIST | case.status = self.STATUS_NEEDASSIST | ||||
| return self.build_talk_notice(self.STATUS_NEEDASSIST) | |||||
| return self.build_talk_notice(self.STATUS_NEEDASSIST, | |||||
| case.title) | |||||
| timestamps = [timestamp for (editor, timestamp) in signatures] | timestamps = [timestamp for (editor, timestamp) in signatures] | ||||
| if time() - max(timestamps) > 60 * 60 * 24 * 2: | if time() - max(timestamps) > 60 * 60 * 24 * 2: | ||||
| if case.last_action != self.STATUS_STALE: | if case.last_action != self.STATUS_STALE: | ||||
| case.status = self.STATUS_STALE | case.status = self.STATUS_STALE | ||||
| return self.build_talk_notice(self.STATUS_STALE) | |||||
| return self.build_talk_notice(self.STATUS_STALE, case.title) | |||||
| return [] | return [] | ||||
| def clerk_needassist_case(self, case, volunteers, newsigs): | def clerk_needassist_case(self, case, volunteers, newsigs): | ||||
| @@ -302,7 +303,8 @@ class DRNClerkBot(Task): | |||||
| def clerk_review_case(self, case): | def clerk_review_case(self, case): | ||||
| if time() - case.file_time > 60 * 60 * 24 * 7: | if time() - case.file_time > 60 * 60 * 24 * 7: | ||||
| if not case.very_old_notified: | if not case.very_old_notified: | ||||
| template = "{{subst:" + self.tl_notify_stale + "|zhang}} ~~~~" | |||||
| template = "{{subst:" + self.tl_notify_stale + "|zhang|2=" | |||||
| template += case.title.replace("|", "|") + "}} ~~~~" | |||||
| notice = _Notice(self.very_old_title, template) | notice = _Notice(self.very_old_title, template) | ||||
| case.very_old_notified = True | case.very_old_notified = True | ||||
| return [notice] | return [notice] | ||||
| @@ -325,7 +327,7 @@ class DRNClerkBot(Task): | |||||
| if time() - case.file_time > 60 * 60 * 24 * 4: | if time() - case.file_time > 60 * 60 * 24 * 4: | ||||
| if case.last_action != self.STATUS_REVIEW: | if case.last_action != self.STATUS_REVIEW: | ||||
| case.status = self.STATUS_REVIEW | case.status = self.STATUS_REVIEW | ||||
| return self.build_talk_notice(self.STATUS_REVIEW) | |||||
| return self.build_talk_notice(self.STATUS_REVIEW, case.title) | |||||
| def read_signatures(self, text): | def read_signatures(self, text): | ||||
| regex = r"\[\[(?:User(?:\stalk)?\:|Special\:Contributions\/)(.*?)(?:\||\]\]).{,256}?(\d{2}:\d{2},\s\d{2}\s\w+\s\d{4}\s\(UTC\))" | regex = r"\[\[(?:User(?:\stalk)?\:|Special\:Contributions\/)(.*?)(?:\||\]\]).{,256}?(\d{2}:\d{2},\s\d{2}\s\w+\s\d{4}\s\(UTC\))" | ||||
| @@ -343,9 +345,10 @@ class DRNClerkBot(Task): | |||||
| cursor.execute(query, (case.id,)) | cursor.execute(query, (case.id,)) | ||||
| return cursor.fetchall() | return cursor.fetchall() | ||||
| def build_talk_notice(self, status): | |||||
| def build_talk_notice(self, status, title): | |||||
| param = self.ALIASES[status][0] | param = self.ALIASES[status][0] | ||||
| template = "{{subst:" + self.tl_notify_stale + "|" + param + "}} ~~~~" | |||||
| template = "{{subst:" + self.tl_notify_stale + "|" + param | |||||
| template += "|2=" + title.replace("|", "|") +"}} ~~~~" | |||||
| return _Notice(self.talk, template) | return _Notice(self.talk, template) | ||||
| def notify_parties(self, case): | def notify_parties(self, case): | ||||