Skip to content

Add support for multiple linked_orderpositions on reusable media#5666

Open
wiffbi wants to merge 59 commits intomasterfrom
reusablemedium-multiop
Open

Add support for multiple linked_orderpositions on reusable media#5666
wiffbi wants to merge 59 commits intomasterfrom
reusablemedium-multiop

Conversation

@wiffbi
Copy link
Contributor

@wiffbi wiffbi commented Nov 28, 2025

This PR adds a ManyToManyField on ReusableMedium for linked_orderpositions. It keeps linked_orderposition in the API for backwards-compatibility. If the medium has more than one linked_orderposition, then the API does not output property linked_orderposition for that medium and blocks PATCH requests with linked_orderposition as invalid.

It also adds a field secret to the medium, so in the future, the medium can be claimed by a customer through the identifier and secret.

internal note: update & merge pretixpos-android!361 after merging this pr

@cla-bot cla-bot bot added the cla-signed label Nov 28, 2025
@wiffbi wiffbi marked this pull request as draft November 28, 2025 14:39
@codecov
Copy link

codecov bot commented Dec 1, 2025

Codecov Report

❌ Patch coverage is 91.95402% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 78.57%. Comparing base (da43984) to head (1ca3ef1).
⚠️ Report is 69 commits behind head on master.

Files with missing lines Patch % Lines
src/pretix/api/serializers/order.py 87.50% 3 Missing ⚠️
src/pretix/api/serializers/media.py 95.45% 1 Missing ⚠️
src/pretix/api/views/checkin.py 90.90% 1 Missing ⚠️
src/pretix/base/exporters/reusablemedia.py 66.66% 1 Missing ⚠️
src/pretix/control/forms/organizer.py 92.30% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #5666      +/-   ##
==========================================
+ Coverage   78.55%   78.57%   +0.02%     
==========================================
  Files         471      472       +1     
  Lines       67755    67883     +128     
==========================================
+ Hits        53223    53341     +118     
- Misses      14532    14542      +10     
Files with missing lines Coverage Δ
src/pretix/api/views/media.py 97.97% <100.00%> (ø)
src/pretix/api/views/order.py 82.67% <100.00%> (+0.05%) ⬆️
src/pretix/base/models/media.py 98.27% <100.00%> (+1.84%) ⬆️
src/pretix/base/services/orders.py 88.54% <100.00%> (+0.05%) ⬆️
src/pretix/control/forms/filter.py 70.47% <ø> (ø)
src/pretix/control/logdisplay.py 62.84% <ø> (ø)
src/pretix/control/views/organizer.py 78.29% <100.00%> (-0.03%) ⬇️
src/pretix/api/serializers/media.py 97.14% <95.45%> (-1.01%) ⬇️
src/pretix/api/views/checkin.py 90.98% <90.90%> (+0.09%) ⬆️
src/pretix/base/exporters/reusablemedia.py 72.00% <66.66%> (+4.00%) ⬆️
... and 2 more

... and 27 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@wiffbi wiffbi marked this pull request as ready for review December 3, 2025 14:21
@robbi5
Copy link
Contributor

robbi5 commented Jan 22, 2026

Screenshot 2026-01-22 at 14 13 22

Currently, when editing a reusable medium, the order code 3UYXK and position -1 is only shown for things I'm adding fresh to the select. The already linked tickets are only displayed with their position, but the order code would be great to know to differentiate them :)

@pc-coholic pc-coholic force-pushed the reusablemedium-multiop branch from eac917b to 0fa2da5 Compare February 25, 2026 12:24
@wiffbi
Copy link
Contributor Author

wiffbi commented Mar 13, 2026

Screenshot 2026-01-22 at 14 13 22

Currently, when editing a reusable medium, the order code 3UYXK and position -1 is only shown for things I'm adding fresh to the select. The already linked tickets are only displayed with their position, but the order code would be great to know to differentiate them :)

Good idea, when using it as a single-choice field, it already had a label_from_instance that does this. Added this to the multiple-choice version as well.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants