This afternoon I finished updating the Report Generator so it completely supports the new option model. Both CSV and HTML reports are working. Filtering works too but right now only YES-NO optional fields are available as filters. I am not sure if I will change that or not.
I need to run through some additional testing and then I’ll post a release. This is enough of a change that I’ll probably bump the revision from 0.0.x to 0.1.x for both the software and database version.
Since I am into the second season of using wp-SwimTeam for the MacDolphins I am running into families who swam last year who don’t plan on swimming this year. When I started building wp-SwimTeam I made the decision that I didn’t want to delete swimmers or families so pool records and a history could be kept easily.
The wp-SwimTeam plugin handles inactive swimmers and families just fine however the E-mail Users plugin we’re using to contact our swim families doesn’t know anything about active or inactive families so people who aren’t interested any more are getting copies of e-mail they shouldn’t really receive. Most ignore them but some don’t want to be bothered. I don’t want to build an e-mail system into wp-SwimTeam, there are plugins that already do that. I am not really interested in building a custom role manager either but that might be the solution. By default I have all users as subscribers now, I could also look into assigning inactive users to have “no role on this blog” and see if that prevents them from receiving e-mail.
I haven’t posted much for the last couple weeks – I have been very busy at work including a very short notice trip to Stockholm. I have not had as much time to work on wp-SwimTeam as I had hoped I’d have. Usually I can get a lot done on the flight home from Europe but not this time. I had to fly Continental and the plane was packed – not real conducive to getting work done.
Anyway, I am back and have been working on re-implementing how I had handled the optional fields for users and swimmers. It has always bothered me that I had hard coded five (5) optional fields in – I knew it was wrong but never bothered to work out a better solution. Before I left for Sweden I implemented a new model which is loosely based on how WordPress handles user meta data.
I had completed the work on the user and swimmer profile aspect of the new option model but the Report Generator was broken as was the ability to export users and swimmers in CSV format. It turns out fixing the Report Generator was more involved than I thought it would be but I now have the User portion of it completed and committed to SVN. Doing the swimmer report should be pretty straight forward, I can reuse most of the code. The hard part is done, to do it for swimmers is pretty simple.
So what is the downside? I haven’t figured out a good way to migrate any information currently stored in the old option fields to the new model. For our swim team I think I am just going to manually re-enter since we have decided to eliminate one of the fields anyway.
On the upside, the new option models allows the site administrator to configure an arbitrary number of extra fields and fields can now be defined as URL, E-mail, Text, Clothing Size, or Yes-No fields.