Plugin surface: write and retire calendar entries that belong to no application #887
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
performance
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Postulo/postulo#887
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
A sync plugin can read the calendar but cannot put anything on it unless it is an interview of an application it already knows. An employment-service plugin needs to place dated entries of its own — a monthly declaration deadline, an expected payment — that belong to no application.
What exists today
Reminder(OwnedModel)(applications/models.py:651):applicationnullable,summary,due_at,done_at,notified_at,uidunique per owner. A reminder without an application is already allowed, and drawn byagenda.events_between()(applications/agenda.py:212-250)..icsimport creates such rows directly (applications/ical_import.py:260-300) — core code.Reminderand any writer for it are not onpostulo.plugins.api.__all__;schedule_interview(services.py:396) is not either.What would change
add_reminder(owner, *, summary, due_at, uid, source, note="") -> Reminderandretire_reminder(owner, uid) -> boolon the surface.uid: a second call with the same uid updates summary, date and note in place, and never touchesdone_at(a person who ticked it keeps it ticked).sourcerecords which plugin placed it (a plugin name), drawn beside the entry on the calendar and in its dialog, so the person sees where it came from; a reminder with asourceis retired, not deleted, when that plugin is removed (theowns_models/erasure rules,CONTRIBUTING.md:876-951)..icsimport moves onto the same writer.Decisions
Reminderor aSyncLink. Recommended: asourcefield — a SyncLink names a remote twin, and these entries have none.Checked against
mainat8c3d03570. Needed by tiagoagueda/postulo-francetravail, an independent plugin (its tiagoagueda/postulo-francetravail#3) outside Postulo's official repositories, but general to any country's employment service.Fixed in
0bb4fe8e7on main.