Home›Forums›General Support – NOT for Volunteer and PTA plugins!›PTA SUS – Changing event date without dropping signups?
- This topic has 3 replies, 2 voices, and was last updated 9 years, 2 months ago by Stephen Sherrard.
-
AuthorPosts
-
-
August 27, 2015 at 4:52 PM #5240Jim KloParticipant
Is there a way to change the event date without dropping all the signups. I’ve got about a hundred signups for an event, and we just have an error for the date which we need to correct.
-
August 27, 2015 at 7:04 PM #5257Stephen SherrardKeymaster
Easiest way would be to directly modify the dates in the custom tables for the plugin, using PHPMyAdmin, or similar database tool. 3 tables, pts_sus_sheets, pta_sus_tasks, pta_sus_signups, all prefixed by your WordPress database prefix (usually wp_).
For the signup table, where you have that many signups, probably easiest to do a search/replace SQL operation for that date, possibly including the task id if you have other tasks from other sheets on the same date that you don’t want changed.
Otherwise, there is nothing built-in to the plugin to allow you to modify dates once people have signed up. In fact, just the opposite, it won’t let you change the date for a task if there are already people signed up for that date, as that would break the operation of the plugin.
-
September 1, 2015 at 8:29 PM #5333Jim KloParticipant
Yes, that’s what I ended up doing. I might just write a plugin that does the this from the UI. It’s basically 3 – 5 SQL update queries with a few joins.
I know you just started this from another plugin – as the schema mirrors the other one. The original author either didn’t have a design when they started, or they were just not a good DB designer. No reason to mirror the date in the model, unless WP doesn’t have a way to mark a field as transitive. I’m no WP/PHP pro, so there might not be a way to prevent that.
-
September 1, 2015 at 9:14 PM #5335Stephen SherrardKeymaster
I’m happy to accept any contributions from other developers, and can incorporate it into the plugin if it’s something that might be useful to others.
Yes, the database structure was already setup by the plugin I forked my version from. It was also one of the first plugins I did for our PTA when still learning a few years back, so I was still learning database structure and MySQL operations as I expanded the features of the plugin.
If I was starting on it again from scratch today, I would definitely do things in a different/better way.
Last year I actually started totally rewriting from scratch the entire PTA Manager system I created for the grade school, in a much more true OOP way. But, then I got hired for some much bigger custom WooCommerce jobs, and my own Wholesale Ordering extension started taking off, and then my son graduated from that school and the new PTA team decided to go with one of the hosted PTA solutions, so I abandoned that project (at least for now), and am only keeping up with fixes/updates for the two independent plugins from the original system that I released at WordPress.org. Happy to take on other developers who want to contribute/add more features to the existing PTA plugins, but they are fairly low priority for me now.
-
-
AuthorPosts
- You must be logged in to reply to this topic.