• Resolved mfrethy

    (@mfrethy)


    Stephen I know by default the number of needed on a sheet cannot be reduced if there are already signups. You know I use a recurring sheet for my volunteers and I typically have 100’s of signups for a particular task throughout the year. Sometimes I need to reduce the number of needed but it already has historical signup data in that slot. I understand why it won’t let you do it but do you have a way to force it? Not opposed to a sql query if needed.

    The page I need help with: [log in to see the link]

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Author DBAR Productions

    (@dbar-productions)

    There are no built-in functions to do that. However, you could just edit the ‘qty’ value in the tasks database table: pta_sus_tasks
    Note, that if it’s a recurring sheet, and you change the qty value, it will change for every instance of that event (every date).
    But, it’s simple enough to change if you have something like PHPMyAdmin on your server control panel.

    Thread Starter mfrethy

    (@mfrethy)

    Thank you. I have PHPMyAdmin access. Any tips on finding the correct one? Just find the sheet number? I have like 30 active sheets. Only need to edit tasks on two of them.

    Plugin Author DBAR Productions

    (@dbar-productions)

    You can figure it out with the sheet_id field and the task title (and any other task fields, such as time start and time end). You can find the ID for the sheet in the main list of signup sheets… the first column “ID#” matches the database ID for the sheet, and that’s the id used to tie tasks to sheets, and saved in the sheet_id column for each task.

    Thread Starter mfrethy

    (@mfrethy)

    Perfect. Thank you.

    Thread Starter mfrethy

    (@mfrethy)

    Okay, forcing the change in the database did work but now I can’t make any changes to the front end on that sheet. I get the same error message when making changes to that sheet as if I’m trying to still reduce that number even when just trying to make task description updates.

    Plugin Author DBAR Productions

    (@dbar-productions)

    It’s still going to do the check to see if the # of existing signups for the task is more than the quantity entered in the form, when you submit the form. No way to turn that off.

    The options at this point are to either clear some of the signups to get the number back down, or you can manually edit the task description in the database (like you did with the quantity). Or, temporarily edit the quantity again to be more than the # of signups, so you can then make any changes from the admin dashboard you want to make to the descriptions, then set it back in the database to the # you want.

    Note, that if this is something you need to do quite often, then perhaps instead of using the Recurring type for the sheet, create a single event sheet, and get it all set up the way you need for the first date, and then use the “Copy” feature in the list of sheets to create a new copy. Then edit the copied sheet to change to the new date, and repeat as necessary. That way you can freely change the # needed for each task for a specific date without coming across this particular issue.

    This was initially setup as a feature for our own PTA web site so that the signup sheet managers wouldn’t accidentally reduce the # of signups below the number of people who have already signed up for an event. It’s not a “bug”, so not really a support issue in that sense. I could certainly modify the code to get rid of that check, but then that opens up another set of issues on which signups get deleted for that task? That’s why there is the ability for the admin to clear any signups right now… if you need to reduce the # available for a task to that below the number that are already signed up, then the admin needs to first pick which signups to clear to reduce the # of signups to the quantity you want. Otherwise, how does my code know which ones it should clear? Granted, this is not ideal for the Recurring events since there is a shared task for each date, so you can’t adjust the quantity for just one of the dates… which takes us back to perhaps the best solution is to set this up as a Single event, and make copies as needed for each date. It’s not ideal, but it’s part of the database structure that I inherited from the original plugin that I start with (from another developer), that I modified for our own school’s PTA web site.

    Thread Starter mfrethy

    (@mfrethy)

    Totally understand the why. Copying sheets doesn’t really work. These tasks are recurring literally daily. For every day of the year. It’s truly a recurring sign-up. I generally add the tasks a year at a time and update the dates at the beginning of the year. Obviously making this change in January would be easy. Making it in September means going back to every day of the year and clearing a spot. Not really a working solution either. And forcing everything in the database just means my sheet managers can no longer do their job. More than happy to take the conversation offline if this isn’t a support issue but it is one I would like to come up with a solution for. I’m a subscriber to all of your products. Not just the free plugin.

    Plugin Author DBAR Productions

    (@dbar-productions)

    Yes, feel free to contact me privately if you want to try to figure out some other solution. If we can figure out something that makes sense for this type of situation, I could try to incorporate it into an update as a new feature. However, I’m also working on a new Events And Signups plugin, starting from scratch with a much more flexible database structure, and with much of what I have learned over the years of working on this plugin. But, that’s still a long way from release.

    In the meantime, one other possible solution for you would be to use the Copy feature to copy your current Recurring sheet (you won’t be able to change the type of sheet, so the copy will also be Recurring). Then, on the copy, change the dates to just the dates you need to change the task quantities on. As long as nobody has signed up for those specific dates yet on the old sheet, you can then remove those dates from the old sheet (but, you’ll have to change back the task quantities on the form as well, so that you don’t get that same quantity error when you submit the form).

    For now, though, let’s mark this thread as “resolved”, as there is nothing more I can do with the way the plugin is now, and it’s not a “bug” that needs fixing.

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Force number of needed reduction’ is closed to new replies.