def submitResolution(ri, unused): ri["status"] = DRAFT_BEING_PROCESSED ri["assigneeId"] = None lang = dblayer.getCommitteeLanguage(ri["committeeId"]) usr = dblayer.getRPC_ID(lang) ri["ownerId"] = usr dblayer.save(ri) comm.push(ri, usr)
def acceptDraft(ri, unused): lang = dblayer.getCommitteeLanguage(ri["committeeId"]) if lang == BILINGUAL: ri["status"] = ACCEPTED_DRAFT_BEING_TRANSLATED else: ri["status"] = ACCEPTED_DRAFT_WAITING_FOR_PRINTING ri["assigneeId"] = None ri["ownerId"] = dblayer.getRPC_ID(lang) dblayer.save(ri) comm.push(ri, ri["ownerId"])
def resolutionPassed(ri, unused): ri["status"] = PASSED_RESOLUTION_BEING_PROCESSED lang = dblayer.getCommitteeLanguage(ri["committeeId"]) ri["assigneeId"] = ri["originalAssigneeId"] if ri["assigneeId"] == None: ri["ownerId"] = dblayer.getRPC_ID(lang) else: ri["ownerId"] = ri["assigneeId"] dblayer.save(ri) comm.push(ri, ri["ownerId"])
def rejectFinal(ri, unused): ri["status"] = SERIOUS_WTF ri["ownerId"] = dblayer.getRPC_ID(dblayer.getCommitteeLanguage(ri["committeeId"])) dblayer.save(ri) comm.push(ri, ri["ownerId"])
def acceptFinal(ri, unused): ri["status"] = PASSED_RESOLUTION_WAITING_FOR_PRINTING ri["ownerId"] = dblayer.getRPC_ID(dblayer.getCommitteeLanguage(ri["committeeId"])) dblayer.save(ri) comm.push(ri, ri["ownerId"])
def translationFinished(ri, unused): ri["status"] = ACCEPTED_DRAFT_WAITING_FOR_PRINTING ri["assigneeId"] = None ri["ownerId"] = dblayer.getRPC_ID(dblayer.getCommitteeLanguage(ri["committeeId"])) dblayer.save(ri) comm.push(ri, ri["ownerId"])