Skip to content

Made number of tickets be set to 0 when event is set to repeating#798

Open
SnorreForbregd wants to merge 2 commits intomainfrom
bug/event-form-using-unintended-fields
Open

Made number of tickets be set to 0 when event is set to repeating#798
SnorreForbregd wants to merge 2 commits intomainfrom
bug/event-form-using-unintended-fields

Conversation

@SnorreForbregd
Copy link

@SnorreForbregd SnorreForbregd commented Mar 5, 2026

Proposed changes

When creating an event, if the amount-of-tickets field was set to a number before changing the event type to repeating, the event page would list 0/x tickets, even though there was no way to sign up.

This change makes it so the number is set to 0 when the event type is set to repeating.
This closes #795

Review guidance

All that was changed was the addition of the line $("#id_number_of_tickets").prop("value", 0); in web/src/news/static/news/js/event/event_form.js

Checklist

(If any of the points are not relevant, mark them as checked, so that it's easy to see which points you've handled or not)

  • I've run makemigrations, makemessages and compilemessages
  • I've written tests that fail without these changes (if relevant/possible)
  • I've manually tested the website UI with different device layouts
    • Most common is to test with typical screen sizes for mobile (320-425 px), tablet (768 px) and desktop (1024+ px), which can easily be done with your browser's dev tools
  • I've manually tested with different users locally
    • This can be e.g. anonymous users (i.e. not being logged in), "normal" non-member users, members of different committees, and superusers
  • I've made sure that my code conforms to the code style guides
    • It's not intended that you read through this whole document, but that you get yourself an overview over its contents, and that you use it as a reference guide / checklist while taking a second look at your code before opening a pull request
  • I've attempted to minimize the number of common code smells
    • See the comment for the previous checkbox
  • I've added documentation
    • E.g. comments, docstrings, or in the README
  • I've added my changes to the "Unreleased" section of the changelog, together with a link to this PR
    • Mainly the changes that are of particular interest to users and/or developers, if any
  • I've added a "Deployment notes" section above and labelled the PR with has-deployment-notes
    • ...if anything out of the ordinary should be done when deploying these changes to the server (e.g. adding/removing an environment variable, manually creating/changing some objects, running a management command, etc.)
  • I've structured my commits reasonably

@make-bot make-bot bot added this to web Mar 5, 2026
@make-bot make-bot bot moved this to Ready for Review in web Mar 5, 2026
@codecov
Copy link

codecov bot commented Mar 5, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.01%. Comparing base (6156191) to head (86a491f).

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main     #798   +/-   ##
=======================================
  Coverage   88.01%   88.01%           
=======================================
  Files         153      153           
  Lines        6225     6225           
=======================================
  Hits         5479     5479           
  Misses        746      746           
🚀 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.

Comment on lines +15 to +16
- Made it so when creating an event, the amount of tickets is set to 0 when setting the event to repeating
- https://github.com/MAKENTNU/web/pull/798
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice to use the same format as the other entries below :)

Also looks like a leading space was missing for the second line. A protip is to check how the markdown code renders by editing any of our .md files directly on GitHub (e.g. the changelog), and pressing the "Preview" tab/button at the top - without committing the changes (unless you want, of course :))

Suggested change
- Made it so when creating an event, the amount of tickets is set to 0 when setting the event to repeating
- https://github.com/MAKENTNU/web/pull/798
- Made it so when creating an event, the amount of tickets is set to 0 when setting the event to repeating
(MAKENTNU/web#798)

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

Labels

None yet

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

Event form still using ticket information when changing from standalone to repeating

2 participants