These periodic tasks need to be executed by the system. When e-mails need to go out, the text of the e-mail is linked from the index of e-mailmessages.
- unconfirmed signature a week ago? send a reminder to confirm, unless petition close date is two weeks away
- unconfirmed signature and petition closes next week? send a reminder to confirm, the "last call", unless reminders_sent = 3
- unconfirmed signature for a closed petition? delete signature and increase a value unconfirmed_signatures_count for the petition with one (to monitor effectiveness)
- unconfirmed user a week ago? send a reminder to confirm
- due date warning: petition reaches due date in one week: 1. has less than 10 signatures, then send an e-mail asking to change the due date or change status to withdrawn 2. has more than 10 signatures, then send an e-mail asking to write about hand over.
- due date withdraw: petition reaches due date but has less than 10 signatures, then change status to withdrawn and send an e-mail to improve and reopen.
- to_process task: check for active petitions (with recent login or news update) then change status to to_process at due date and send the petition announcement to recipient of petition with request for an answer and a reference number: reply by e-mail or log in to petition desk.
- get reference task: check for manually entered reference number, send reminder of announcement of the petition every two weeks if there is no reference number. Then change status to not processed and send e-mail to signatories with default signatories answer (news update) when no reference. When there is a reference, then update due date to now.
- office response task: send e-mail to ask for a response with text about the process we expect, repeat after two weeks, then change status into in_process. Check for due date and status 'in process' when both apply, then send the virtual hand over and send e-mail to signatories that the petition is handed over. Wait three days, then send e-mail with a request answer due date. Repeat endlessly every week with cc to admin. When the answer due date is reached send e-mail with request for answer to petition. Once the answer is published, then change status to completed.
- adopt task: Unless petitioner did not write news updates, then status = orphan
- petition status is draft for more than a week, send a friendly reminder to finish it or ask for help. Or to get the reminder again at a certain date. Otherwise, in three weeks the petition will be deleted after the last time logged in to.
adopt a petition detour
- petition reaches due date but without news updates from petitioner, then send e-mail to petitioner to write about the pending hand over otherwise the petition is open for adoption by other signatories
- petition with no news updates and a week passed due date, then change status to orphan
- petition with status is orphan then send e-mail to first signatory (with oldest confirm date) with any pledge value with request to adopt the petition, change due date and write news update. Or answer questionaire and not adopt it.
- petition with status orphan, send an e-mail two days after the previously asked signatory to the next with any pledge value not yet asked with the request to adopt (see previous)
- petition with status orphan and all signatories asked to adopt one week ago, then change status to withdrawn and publish results of questionaire in newsitem with show_on_petition = 1.
- petition with status orphan and due date in the future, change status back to signable (apparently the petitioner woke up and became active)