Export and import: a reminder about no application is left out of the archive #334

Closed
opened 2026-10-01 06:31:28 +00:00 by tiagoagueda · 0 comments
Owner

Found on 2026-09-30, reading src/postulo/core/export.py and src/postulo/core/importer.py at 0a5cad587.

A reminder may be about no application: Reminder.application is nullable, the reminder form says "Leave it empty for a reminder about none" (src/postulo/applications/forms.py:507), and POST /api/v1/reminders takes application_id as optional (src/postulo/api/routers/reminders.py:40-46). The personal archive carries reminders only inside the application they are about, so those reminders are in no archive.

  • Where:
    • core/export.py:229 (REMINDER_FIELDS), :644 (the prefetch postings__applications__reminders) and :709-711 (each application's reminders list) are the only places the export mentions reminders.
    • core/importer.py:631 and :687-697 read reminders only from an application's entry.
  • What happens: Export my data leaves out every reminder that is about no application, and nothing in the archive or on the page says so. Importing that archive cannot bring them back. An export followed by an import loses them silently.
  • Who meets it: anybody who made such a reminder and then moves to another instance, or takes the export that Delete my account offers first (#33) and deletes the account.
  • Why it matters: the archive describes itself as "Everything one Postulo account holds" (core/export.py:596-600). It is the same gap #239 closed for contacts recorded at no company (format 20). postulo/postulo-dav#12 would make these reminders common: every task made on the phone outside an application's task becomes one.
  • Fix:
    1. A list of the reminders about no application at the top of the archive, as the contacts at no company have (core/export.py:625), with the same REMINDER_FIELDS.
    2. The importer restores them, counts them in its report, and still reads archives of the older formats.
    3. FORMAT_VERSION goes to 26, with its note beside the others.

The instance backup (manage.py backup) is a database dump and is not affected.

Done when

  • A test exports an account holding one reminder about an application and one about none, imports the archive into an empty account, and finds both, the second still about none.
  • An archive of format 25 still imports.
  • The wiki's Backups and your data names reminders among what an export holds, if it lists them.

Found while filing the extension and DAV plugin improvements of 2026-09-30.

Found on 2026-09-30, reading `src/postulo/core/export.py` and `src/postulo/core/importer.py` at `0a5cad587`. A reminder may be about no application: `Reminder.application` is nullable, the reminder form says "Leave it empty for a reminder about none" (`src/postulo/applications/forms.py:507`), and `POST /api/v1/reminders` takes `application_id` as optional (`src/postulo/api/routers/reminders.py:40-46`). The personal archive carries reminders only inside the application they are about, so those reminders are in no archive. - **Where:** - `core/export.py:229` (`REMINDER_FIELDS`), `:644` (the prefetch `postings__applications__reminders`) and `:709-711` (each application's `reminders` list) are the only places the export mentions reminders. - `core/importer.py:631` and `:687-697` read reminders only from an application's entry. - **What happens:** *Export my data* leaves out every reminder that is about no application, and nothing in the archive or on the page says so. Importing that archive cannot bring them back. An export followed by an import loses them silently. - **Who meets it:** anybody who made such a reminder and then moves to another instance, or takes the export that *Delete my account* offers first (#33) and deletes the account. - **Why it matters:** the archive describes itself as "Everything one Postulo account holds" (`core/export.py:596-600`). It is the same gap #239 closed for contacts recorded at no company (format 20). postulo/postulo-dav#12 would make these reminders common: every task made on the phone outside an application's task becomes one. - **Fix:** 1. A list of the reminders about no application at the top of the archive, as the contacts at no company have (`core/export.py:625`), with the same `REMINDER_FIELDS`. 2. The importer restores them, counts them in its report, and still reads archives of the older formats. 3. `FORMAT_VERSION` goes to 26, with its note beside the others. The instance backup (`manage.py backup`) is a database dump and is not affected. ## Done when - A test exports an account holding one reminder about an application and one about none, imports the archive into an empty account, and finds both, the second still about none. - An archive of format 25 still imports. - The wiki's *Backups and your data* names reminders among what an export holds, if it lists them. Found while filing the extension and DAV plugin improvements of 2026-09-30.
tiagoagueda added this to the 0.5.0 milestone 2026-10-01 06:31:28 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Postulo/postulo#334
No description provided.