Dandelion is an open-source project. View the code on Github

Ticket Sales and Event Management Improvements

The platform now considers the sales end date when checking ticket availability, ensuring tickets are no longer sold after their specified end date even if quantities remain. Event organizers can now track how orders are placed through a new 'via' field, providing valuable insights into marketing effectiveness and customer acquisition channels. Additionally, the check-in functionality for events has been reorganized with dedicated controllers and views, improving the overall experience for event organizers when managing attendee check-ins.

User Experience Enhancements

Maps now center on user coordinates when available, creating a more personalized browsing experience. The platform's branding has been updated to include "soulful" in its keywords and typed strings on the homepage, better reflecting the platform's ethos. User feedback is now displayed more consistently, with simplified logic that ensures feedback is shown whenever it exists, regardless of other factors, making the platform more transparent and informative for users.

Account Management and Payment Processing

A new account merging feature has been implemented, allowing users to consolidate their accounts by transferring all associated data from one account to another. The payment processing system has been strengthened with improved validation, ensuring that payment amounts are present and greater than zero before processing. The platform has also updated its terminology, changing "picture" to "image" throughout the system for better semantic consistency, while improving the handling of images with standardized validation across the platform.

Commits on Apr 24, 2025
ed708aa

🐛 (app/views/purchase/_purchase.erb): Fix regex for question matching

The previous regex q.starts_with?('# ') was not correctly extracting the question text when it started with '# '. This commit updates the regex to q =~ /^#\s*(.+)/ to properly match and capture the question text, ensuring that the text is correctly displayed.

Commits on Apr 22, 2025
9fc4e65

🐛 (check_in.rb, orders.rb): use unscoped when searching tickets

This commit fixes an issue where searching for tickets was not returning the correct results due to a default scope being applied. By using Ticket.unscoped, we ensure that all tickets are considered in the search, regardless of the default scope.

Commits on Apr 21, 2025
6f92d1c

♻️ (models/concerns/order_accounting.rb): Refactor credit_on_behalf_of_revenue_sharer method to remove unnecessary o. prefix

Commits on Apr 19, 2025
dc5caa0

🐛 (models/concerns/order_accounting.rb): Fix calculation of credit for revenue sharer

The previous calculation of credit_on_behalf_of_organisation was incorrect. It was subtracting credit_on_behalf_of_revenue_sharer even when credit_on_behalf_of_revenue_sharer was nil, leading to incorrect results.

This commit fixes this by adding a check to ensure that credit_on_behalf_of_revenue_sharer is not nil before performing the subtraction.

The previous calculation of credit_on_behalf_of_revenue_sharer was also incorrect. It was using local variables instead of the object's attributes.

This commit fixes this by using the object's attributes instead of local variables.

Commits on Apr 15, 2025
771dd49

✨ (app): Add 'via' field to orders

This commit introduces a new 'via' field to the orders model and associated controllers and views. This field allows tracking the source or medium through which an order was placed, providing valuable insights into marketing effectiveness and customer acquisition channels.

The following changes were made:

  • Added the 'via' field to the Order model.
  • Updated the orders controller to include the 'via' field in CSV exports.
  • Updated the purchase controller to capture the 'via' parameter from the request.
  • Updated the Zapier controller to include the 'via' field in the order data.
  • Updated the events orders table view to display the 'via' field.
  • Updated the purchase form to include a hidden field for the 'via' parameter.
9b921f4

🐛 (models/concerns/event_opencollective.rb): safely access nested data in JSON response to prevent errors when data is missing
✨ (tasks/tasks.rake): uncomment event.check_oc_event task to enable checking open collective events

Commits on Apr 12, 2025
2e5fb93

♻️ (models): Refactor image validation logic to improve readability and remove duplication

Commits on Apr 11, 2025
b265604

✨ (app/views/accounts/_image.erb): create partial to display account image in a square format

Commits on Apr 09, 2025
2751cda

⚡️ (tasks.rake): improve hourly tasks performance

The order of execution of hourly tasks was changed to improve performance. The stale uncompleted orders are now deleted first. The check_oc_event task was commented out because it is not needed.

Commits on Apr 07, 2025
5b434b4

💬 (app/app.rb): update og_desc to include "soulful" in keywords
💬 (app/views/home_not_signed_in.erb): add "soulful" to the list of typed strings

6ebf19d

♻️ (app/views/events/event.erb): simplify description sanitization logic

The conditional logic for sanitizing the event description was unnecessarily complex. The check for @event.organisation.allow_iframes? was removed, and Sanitize::Config::IFRAMES is now consistently used. This simplifies the code and ensures consistent sanitization behavior.

27a3cc3

✨ (models/event.rb): consider sales_end when checking availability

This commit modifies the sold_out? and tickets_available? methods in the Event model to consider the sales_end attribute of ticket types.

Previously, these methods only checked the number_of_tickets_available_in_single_purchase to determine if an event was sold out or if tickets were available. Now, they also check if the sales_end date has passed. If sales_end is in the past, the ticket type is considered unavailable, even if there are tickets remaining.

This change ensures that tickets are no longer sold after the sales_end date, even if the ticket quantity has not been exhausted.

07e8158

🔥 (app/views/events/_feedback.erb): remove condition that checks if activities are empty

The condition @event.organisation.activities.empty? was removed because it was redundant and unnecessary. The primary check is whether there are any unscoped event feedbacks for the organization. Whether or not the organization has activities is irrelevant to displaying the feedback. Removing this condition simplifies the logic and ensures that feedback is displayed as long as it exists, regardless of the presence of activities.

d51e3ad

✨ (models/account.rb): implement account merging logic

This commit introduces the merge method to the Account model. This method allows merging one account into another, transferring all has_many associations from the account to be destroyed to the target account.

The method handles regular and polymorphic associations, updating foreign keys accordingly. It also includes logic to prevent merging an account with itself and returns self for method chaining. After transferring associations, the method destroys the account being merged.

Commits on Apr 03, 2025
df56dc2

✨ (maps/_map.erb): set map center to user coordinates if available

Commits on Apr 02, 2025
7c28d93

♻️ (accounts.rb, activity_applications.rb, auth.rb, \ events.rb, mapplications.rb, members.rb, orders.rb, \ helpers.rb, _daily.erb, _nav_top.erb, _following.erb, \ _square.erb, _top.erb, edit.erb, activity_application.erb, \ activity_applications.erb, apply.erb, view.erb, \ _event_feedbacks.erb, _home.erb, _attendees.erb, stats.erb, \ _cocreators.erb, _membership_row.erb, join.erb, members.erb, \ _mapplications.erb, _verdicts.erb, apply.erb, _options.erb, \ referral.erb, _rota_rslot_role.erb, account.rb, \ account_fields.rb, account_validation.rb, \ image_with_validation.rb, order_notifications.rb, \ ticket_notifications.rb, order.rb, organisationship.rb, \ upload.rb): rename picture to image

This commit renames all instances of "picture" to "image" in the codebase. This change improves the semantics and consistency of the code, as "image" is a more general and descriptive term for the concept being represented. This change also updates the image thumbnail size to 1920x1920.

736dfd6

♻️ (models): refactor image validation into a shared concern

This commit introduces a new module, ImageWithValidation, to encapsulate the logic for validating image formats and processing them with Dragonfly. This module is then included in several models (Account, Activity, Cohostship, Event, Gathering, Organisation, Photo, Space, Tactivity) to remove duplicated code and ensure consistent image handling across the application.

The ImageWithValidation module includes:

  • A dragonfly_accessor :image declaration to define the image attachment.
  • An after_assign block to process the image after it's assigned, creating a thumbnail if it's an image.
  • A before_validation callback to validate the image format.

The duplicated image format validation logic is removed from the individual models and replaced with the inclusion of the ImageWithValidation module.

This refactoring improves code maintainability, reduces redundancy, and ensures consistent image handling throughout the application.

Commits on Apr 01, 2025
bf59c6c

✏️ (app/controllers/check_in.rb): Fix typo in environment variable name from BASE_URL to BASE_URI

a1ff637

🚚 (app): Move check-in logic to a dedicated controller and views

This commit refactors the check-in functionality for events by moving it from the events controller to a new check_in controller. This improves code organization and separation of concerns.

The following changes were made:

  • Created a new check_in controller with routes and actions for handling check-in related tasks.
  • Moved the check-in related views to new files under app/views/events.
  • Updated the event navigation to link to the new check-in routes.
  • Added a check-in navigation partial for non-admin users.
  • Added a check-in list table partial for displaying tickets.
  • Added a check-in toggle partial for toggling the check-in status of a ticket.
  • Added a check-in list view for displaying a list of tickets.
  • Added a check-in scanner view for scanning tickets.
229b985

🎨 (app/views/accounts/_pay.erb): fix typo in partial render

The parenthesis was misplaced in the partial render, this commit fixes it.

9185a69

🦺 Add validation for payment amount

Ensure the :amount parameter is present and greater than zero before processing a payment request for an organisation.

Previously, the endpoint did not validate the payment amount, potentially leading to errors or invalid operations. This change adds a check that halts the request with a 400 Bad Request status if the amount is missing or not positive.

3ef0b95

🐛 Fix contribution calculation and simplify progress partial

Correctly calculate monthly contribution amount by multiplying the value from the fragment by 100 to convert to cents for Money lib.

Replace custom caching helper ('cp') with standard 'partial' calls in '_pay.erb' and 'home_signed_in.erb' for rendering the progress. Remove redundant STRIPE_SK environment variable check within the '_pay_progress' partial.

6b63098

🎨 Improve structure of pay progress partial

Wrap initial Ruby logic block in ERB tags and adjust indentation throughout the file. This improves readability and ensures the logic block is correctly processed as server-side code without unintended output.