Example #1
0
def draftPrinted(ri, unused):
    ri["status"] = PRINTED_DRAFT
    user = dblayer.getCommitteeRapporteurID(ri["committeeId"])
    ri["ownerId"] = user
    dblayer.save(ri)
    comm.setMessage(ri, user, "Draft printed!", "The draft resolution {} has been printed; go pick it up!".format(ri["resolutionId"]))
    comm.push(ri, user)
Example #2
0
def finalPrinted(ri, unused):
    ri["status"] = PRINTED_FINAL_RESOLUTION
    user = dblayer.getCommitteeRapporteurID(ri["committeeId"])
    ri["ownerId"] = user
    dblayer.save(ri)
    comm.setMessage(ri, user, "Final resolution printed!", "The final resolution {} has been printed; go pick it up!".format(ri["resolutionId"]))
    comm.push(ri, user)
Example #3
0
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)
Example #4
0
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"])
Example #5
0
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"])
Example #6
0
def assignForTranslation(ri, translatorParam):
    ri["assigneeId"] = translatorParam
    ri["ownerId"] = translatorParam
    dblayer.save(ri)
    comm.push(ri, translatorParam)
Example #7
0
def assignDraft(ri, rpParam):
    ri["assigneeId"] = rpParam
    ri["originalAssigneeId"] = rpParam
    ri["ownerId"] = rpParam
    dblayer.save(ri)
    comm.push(ri, rpParam)
Example #8
0
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"])
Example #9
0
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"])
Example #10
0
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"])
Example #11
0
def rejectDraft(ri, unused):
    ri["status"] = RETURNED_DRAFT
    usr = dblayer.getCommitteeRapporteurID(ri["committeeId"])
    ri["ownerId"] = usr
    dblayer.save(ri)
    comm.push(ri, usr)
Example #12
0
def resolutionFailed(ri, unused):
    ri["status"] = FAILED_RESOLUTION
    ri["ownerId"] = None
    dblayer.save(ri)
Example #13
0
def saveResolution(ri, unused):
    dblayer.save(ri)