CRM-19626 Event Registration page allows registration even if no number (or the number 0) has been entered in any ticket quantity boxes

    Details

    • Versioning Impact:
      Major (incompatible API change)
    • Documentation Required?:
      None
    • Funding Source:
      Paid Issue Queue
    • Payment Status:
      Paid

      Description

      Scenario / How to Replicate:
      The user creates an event page, using a price set that features a few 'Text / Numeric Quantity' boxes for users to specify how many of each ticket type they wish to purchase e.g. 3 student tickets, 4 standard tickets.

      Problem:
      Even if no number is entered into any of the quantity boxes, or the number entered is 0, the 'Continue' button still remains visible and thus allows the user to register.

      Consequence:
      Users can register successfully for an event without paying. This has already happened once with one of our events.

      Our current workaround is some javascript/jquery in custom wordpress template applied to that page, which implements the required functionality (stopping the 'Continue' button displaying unless there is a non-zero value and no zero values in the quantity boxes).

        Attachments

        1. freeEvent.jpg
          192 kB
          Eileen McNaughton
        2. screenshot-1.jpg
          132 kB
          William Gordon

          Activity

          [CRM-19626] Event Registration page allows registration even if no number (or the number 0) has been entered in any ticket quantity boxes
          Yashodha Chaku added a comment -

          William Gordon Rough estimate is ~1 hour. Do you want the core team to work on this as a paid issue?

          William Gordon added a comment - - edited

          @yashodha Yes please - I have now completed the paid issue form https://civicrm.org/paid-issue-queue, specifying this bug report.

          Jitendra Purohit added a comment -
          Monish Deb added a comment -

          Tested working fine. William Gordon have a look !!

          William Gordon added a comment -

          Looks good, will check with my manager and hopefully get payment signed off ASAP.

          Yashodha Chaku added a comment -
          William Gordon added a comment -

          We have carried out further testing, and are happy to be invoiced for the work.

          Yashodha Chaku added a comment -

          Cool, thanks!

          Eileen McNaughton added a comment -

          This is worrying me. I feel like it would be perfectly valid for an event to be free if no option was selected, but we have treated that as a bug

          Josh Gowans added a comment -

          But even a free ticket is "1" ticket, right? Not "0" tickets? I've encountered this as well and it does seem odd to allow a registration for "0" participants.

          Eileen McNaughton added a comment -

          Example of a free event with optional extras (which does not work as a result of this)

          Eileen McNaughton added a comment -

          I think the attached image is a perfectly legit event config which is broken by this change. I'm still leaning towards reverting this from the IRC and getting more feedback in a timely manner. This feels like a breaking feature change to me.

          I know it's a bit sticky because this came through the paid issue queue - but I am also worried rolling it out could have consequences to other sites

          Yashodha Chaku added a comment -

          Eileen McNaughton As regards to CRM-19626 taking away the ability to by-pass paid event payment by entering 0 in text-box seemed like the logical thing to do. But I can see your point where someone may actually be using this as a feature in which case the same can be seen as an introduced bug.

          We can address both the concerns by making it configurable and introducing a new column min_value in civicrm_price_field_value table which will take the call instead of the code deciding what the behavior should be.

          Let me know if you agree on the same.

          Yashodha Chaku added a comment -

          As per discussion on reverted PR we will make it configurable at price set.

          Add a column 'min_value' in civicrm_price_set table.

          Registration form should throw form rule if the total price < min_value.

          Andrew West added a comment -

          We paid for it on the PIQ, and are more than happy to manually apply the existing patch for the interim - so no worries from us

          Eileen McNaughton added a comment -

          We would also need to apply the same form rule to the contribution page (which I don't think would add to the spec because otherwise we'd need to only expose the option in some cases).

          Can probably leave off for back office forms?

          Jitendra Purohit added a comment -

          PR has been submitted https://github.com/civicrm/civicrm-core/pull/9517. William Gordon Andrew West Eileen McNaughton Can you please check if it is working fine for you?

          Thanks!

          Yashodha Chaku added a comment -

            People

            • Assignee:
              Yashodha Chaku
              Reporter:
              William Gordon

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1 hour Original Estimate - 1 hour
                1h
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 5 hours, 45 minutes
                5h 45m