-
Notifications
You must be signed in to change notification settings - Fork 103
Implemented additional options and features for vouchers #771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Conversation
Reviewer's GuideThis PR adds new voucher configuration options—minimum usages, free add‐ons, bundled inclusion—and supports assigning vouchers to exhibitors with comments, updating both the backend form definitions and the UI templates to reflect and manage these options. Class diagram for updated Voucher form fieldsclassDiagram
class VoucherForm {
+minimum_usages: Integer
+free_addons: Boolean
+include_bundled: Boolean
+exhibitor: String
+exhibitor_comment: String
}
File-Level Changes
Possibly linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @Sana0523 - I've reviewed your changes - here's some feedback:
- Please include the generated migration file for these new voucher fields in the PR instead of asking users to run makemigrations manually.
- Add a min_value validator (and possibly help_text) to the minimum_usages field to prevent negative values and improve UX.
- Consider renaming or adding help_text to the “Include bundled” label so it’s clear which bundled items are being included.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Please include the generated migration file for these new voucher fields in the PR instead of asking users to run makemigrations manually.
- Add a min_value validator (and possibly help_text) to the minimum_usages field to prevent negative values and improve UX.
- Consider renaming or adding help_text to the “Include bundled” label so it’s clear which bundled items are being included.
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
@Sana0523 Thanks, we will review it. Could you please use a full screen capture tool, e.g. a Chrome plugin in future. This way it will be easier to see the whole page. Thank you! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These changes appear not to be working, even after trying the migrate command. I still see an internal server error
@Saksham-Sirohi I'll look into the error from my end and get back. |
@mariobehling
Implemented additional options and features for vouchers as per requirement.
Issue fix: #676
If you encounter an Internal Server Error due to model migrations, please run:
docker exec -it eventyay-ticket python pretix/src/manage.py makemigrations pretixbase
docker exec -it eventyay-ticket python pretix/src/manage.py migrate
Summary by Sourcery
Introduce new voucher options and features including minimum usage limits, free add-ons, bundled item inclusion, exhibitor association, and exhibitor comments; update forms, detail view, and listing templates to surface these fields.
New Features:
Enhancements: