Browse Source

TODO list for clerk_case().

tags/v0.1^2
Ben Kurtovic 12 years ago
parent
commit
ca6f386802
1 changed files with 21 additions and 1 deletions
  1. +21
    -1
      earwigbot/tasks/drn_clerkbot.py

+ 21
- 1
earwigbot/tasks/drn_clerkbot.py View File

@@ -226,7 +226,27 @@ class DRNClerkBot(Task):


def clerk_case(self, conn, case, volunteers): def clerk_case(self, conn, case, volunteers):
"""Clerk a particular case and return a list of any notices to send.""" """Clerk a particular case and return a list of any notices to send."""
case # TODO
if case.apparent_status == self.STATUS_NEW:
# NOTIFY ALL PARTIES
# SET STATUS TO OPEN IF VOLUNTEER EDITS
elif case.apparent_status == self.STATUS_OPEN:
# OPEN FOR OVER FOUR DAYS: SET STATUS TO REVIEW
# SEND MESSAGE TO WT:DRN
# ELSE OVER 10K TEXT SINCE LAST VOLUNTEER EDIT: SET STATUS TO NEEDASSIST
# SEND MESSAGE TO WT:DRN
# ELSE NO EDITS IN ONE DAY: SET STATUS TO STALE
# SEND MESSAGE TO WT:DRN
elif case.apparent_status == self.STATUS_NEEDASSIST:
# OPEN FOR OVER FOUR DAYS: SET STATUS TO REVIEW
# ELSE VOLUNTEER EDIT SINCE STATUS SET: SET STATUS OPEN
elif case.apparent_status == self.STATUS_STALE:
# OPEN FOR OVER FOUR DAYS: SET STATUS TO REVIEW
# ELSE EDITS SINCE STATUS SET: SET STATUS OPEN
elif case.apparent_status == self.STATUS_REVIEW:
# OPEN FOR OVER SEVEN DAYS: SEND MESSAGE TO ZHANG
elif case.apparent_status in [self.STATUS_RESOLVED, self.STATUS_CLOSED]:
# ONE DAY SINCE STATUS SET: SET STATUS ARCHIVED
# ADD ARCHIVE TEMPLATE, REMOVE NOARCHIVE


def save(self, page, cases, kwargs): def save(self, page, cases, kwargs):
"""Save any changes to the noticeboard.""" """Save any changes to the noticeboard."""


Loading…
Cancel
Save