PTA Sign Up sheet user can sign up for 2 concurrent tasks

HomeForumsGeneral Support – NOT for Volunteer and PTA plugins!PTA Sign Up sheet user can sign up for 2 concurrent tasks

Viewing 3 reply threads
  • Author
    Posts
    • #7911
      Cyrelle Gerson
      Participant

      The event setup page has the following choice:

      Allow Duplicate Signup Times? Check this to allow a volunteer to signup for more than one task (in this sheet) with overlapping time ranges.

      When I leave this unchecked, a user is still able to sign up for 2 different tasks that are scheduled for overlapping time periods. I was expecting that leaving this choice unchecked would prevent that from happening.

      What is the behavior that should happen? I would like to prevent users from signing up for 2 tasks with overlapping time periods.

      Thanks.

    • #7915
      Stephen Sherrard
      Keymaster

      Are the tasks within the same sheet? That function only checks for overlaps for tasks within the same sheet. Also, there needs to be a start time and an end time for each task. If any of the tasks don’t have both start and end times, then those are not checked, as you need both a start time and an end time to define a time range. End times also need to be after the start times.

      Start and end times are converted to unix timestamps and then compared with simple math operators.

    • #7917
      Cyrelle Gerson
      Participant

      Yes, the tasks are on the same sheet. There are start and end times on both tasks. End times are after the start times.

      I have WordPress 4.4 installed and most recent version of your plugin.

      Thanks.

      • #7921
        Cyrelle Gerson
        Participant

        I figured out what why it wasn’t working. One of the tasks runs from 7:30PM to 10:00PM. The other task runs from 8:00PM to 1:00 AM the next morning. But when you put in the 2nd task in the form that way, it must think that 1:00 AM is the same day and is before 8:00PM, therefore not a valid time period. Changing the end of the 2nd event to 11:55PM fixed the problem.

        However, in real life the event ends at 1:00 AM the next day. Might there be a way to modify the task form so that you can have a task that starts on one day and ends the next day? I am using the multi-day event type.

        Thanks.

    • #7923
      Stephen Sherrard
      Keymaster

      There is not a simple way to change that behavior without screwing up everyone who is already using this plugin. Dates and times are stored separately, and the times were really for display only until this new check for overlaps function.

      I could probably figure something out, by throwing in some extra checks to see if the end time is less than the beginning time, and then adding 24 hours to it (to make it the next day) before converting it to a unix timestamp for the overlap comparisons.

Viewing 3 reply threads
  • You must be logged in to reply to this topic.