WIP: automatic workflow to request the correct item / address of a requester #144

Draft
clarity wants to merge 9 commits from clarity/ticket-requests into dev
Owner
No description provided.
added readme for shipment features
All checks were successful
/ test (push) Successful in 2m19s
8d830bda64
added public api for shipments
Some checks failed
/ test (push) Failing after 0s
3d01f16750
added venv to gitignore
All checks were successful
/ test (push) Successful in 1m54s
887eb13524
# Conflicts:
#	core/core/settings.py
The early shipment container is gone: a ticket now carries item pick and
address requests of its own, reached through one personal link
(IssueThread.link_secret). The finder picks their item from the ticket's
possible items and gives a plain postal address; the answers become
confirmed and discarded relations and move the ticket on, and the ticket
lists its requests, its public link and a timeline entry for every step.

The shipments app is removed with it, this is about asking, not shipping.
Operators send the finder a personal link that asks which of the possible items is theirs and where to send it, and see the answers on the ticket. Replaces the shipment link prototype.
An unknown ticket or item id, or an event slug that does not exist, shows a not found notice instead of a spinner that never ends.
A withdrawn request used to read as if the operator who sent it had
taken it back, also when the finder's "none of these" did. The request
now records who cancelled it, and the timeline entry names them; no
author means the finder's answer withdrew it.
The whole header was there twice; only the second copy had files.serving.
reply_into_ticket and the LMTP handler filter on the configured domain,
so tests that hardcode @localhost addresses only pass when MAIL_DOMAIN
happens to be localhost. With the repo's own core/.env (c3lf.de) 38 of
them failed.

The shipments tests pin the domain with override_settings, which works
because shipments/mail.py reads settings.MAIL_DOMAIN at call time. The
mail and authentication tests cannot: mail/protocol.py and mail/models.py
bind the setting at import, and the legacy user's address is written by a
migration before any override applies, so those derive their addresses
from the setting instead. The suite now passes under either domain.
"Ask the finder" showed up whenever the timeline held any mail, but a
reply threads onto an *inbound* one. On a manually created ticket where an
agent had only ever sent mail out, the button was offered and the send
came back 400.

The rule now lives in IssueThread.first_inbound_mail(), which the reply
endpoint and send_requests already needed and which the serializer
exposes as can_reply. It reads the prefetched mails, so the ticket list
costs no extra queries.
Move the finder's requests along when a ticket is merged
All checks were successful
/ frontend (push) Successful in 1m23s
/ test (push) Successful in 2m3s
/ frontend (pull_request) Successful in 1m19s
/ test (pull_request) Successful in 1m56s
9b84b4068c
Merging moved mails, comments, relations and vouchers to the target
ticket but left the item pick and address requests behind on the deleted
source, so the answers and the timeline entries vanished with it. The
requests now move too; the finder's link keeps the source's secret and
goes dead, the target's link shows what is still open.
clarity requested review from j3d1 2026-09-27 14:16:29 +00:00
clarity self-assigned this 2026-09-27 14:16:35 +00:00
Author
Owner

ich werde das nochmal rebasen - die commits aus 2025 sind quasi nicht mehr relevant für dieses feature.

ich werde das nochmal rebasen - die commits aus 2025 sind quasi nicht mehr relevant für dieses feature.
clarity force-pushed clarity/ticket-requests from 9b84b4068c
All checks were successful
/ frontend (push) Successful in 1m23s
/ test (push) Successful in 2m3s
/ frontend (pull_request) Successful in 1m19s
/ test (pull_request) Successful in 1m56s
to 2efa8cd92a
All checks were successful
/ frontend (pull_request) Successful in 1m26s
/ frontend (push) Successful in 1m26s
/ test (pull_request) Successful in 2m9s
/ test (push) Successful in 2m11s
2026-09-27 14:22:23 +00:00
Compare
added buttons to the related items column
All checks were successful
/ frontend (pull_request) Successful in 1m29s
/ frontend (push) Successful in 1m29s
/ test (push) Successful in 2m5s
/ test (pull_request) Successful in 2m7s
e8156304d5
Author
Owner

hinweis: accessibility checken

hinweis: accessibility checken
Author
Owner

kommentar von jedi: pull request kleiner machen. es werden noch viele dinge angefasst, die man vielleicht nicht anfassen müsste.

kommentar von jedi: pull request kleiner machen. es werden noch viele dinge angefasst, die man vielleicht nicht anfassen müsste.
clarity force-pushed clarity/ticket-requests from e8156304d5
All checks were successful
/ frontend (pull_request) Successful in 1m29s
/ frontend (push) Successful in 1m29s
/ test (push) Successful in 2m5s
/ test (pull_request) Successful in 2m7s
to c9f6e327dc
All checks were successful
/ frontend (push) Successful in 1m33s
/ frontend (pull_request) Successful in 1m35s
/ test (push) Successful in 2m16s
/ test (pull_request) Successful in 2m18s
2026-10-11 14:27:53 +00:00
Compare
clarity changed target branch from testing to dev 2026-10-11 15:01:58 +00:00
clarity force-pushed clarity/ticket-requests from c9f6e327dc
All checks were successful
/ frontend (push) Successful in 1m33s
/ frontend (pull_request) Successful in 1m35s
/ test (push) Successful in 2m16s
/ test (pull_request) Successful in 2m18s
to 62119ae2f4
All checks were successful
/ frontend (pull_request) Successful in 1m31s
/ frontend (push) Successful in 1m35s
/ test (push) Successful in 2m11s
/ test (pull_request) Successful in 2m13s
2026-10-11 15:14:08 +00:00
Compare
@ -42,1 +42,4 @@
# Absolute base of the public site, used to build links that go out by mail.
# Unlike PRIMARY_HOST and MAIL_DOMAIN above this is a full URL, not a bare host.
PUBLIC_BASE_URL = os.getenv('PUBLIC_BASE_URL', f'https://{PRIMARY_HOST}')
Author
Owner

jedi: inline in die email, keine eigene variable

jedi: inline in die email, keine eigene variable
@ -0,0 +1,64 @@
"""Response builders for stored files.
Author
Owner

jedi: komplette serving.py inlinen. das muss nicht in eine eigene datei ausgelagert werden.

jedi: komplette serving.py inlinen. das muss nicht in eine eigene datei ausgelagert werden.
@ -0,0 +1,80 @@
"""The countries the application knows, keyed by ISO 3166-1 alpha-3.
Author
Owner

jedi: countries einfach vom user als string eingeben lassen.

jedi: countries einfach vom user als string eingeben lassen.
@ -189,0 +318,4 @@
ticket_updates.none_matched(self)
class AddressRequest(TicketRequest):
Author
Owner

jedi: Zu komplex. Zu viele Methoden, warum transaction atomic?

jedi: Zu komplex. Zu viele Methoden, warum transaction atomic?
All checks were successful
/ frontend (pull_request) Successful in 1m31s
/ frontend (push) Successful in 1m35s
/ test (push) Successful in 2m11s
/ test (pull_request) Successful in 2m13s
This pull request is marked as a work in progress.
This branch is out-of-date with the base branch
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin clarity/ticket-requests:clarity/ticket-requests
git switch clarity/ticket-requests
Sign in to join this conversation.
No reviewers
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
c3lf/c3lf-system-3!144
No description provided.