Update on Events

I’ve been working on Events quite a bit over the last couple of days.  At this point I have all of the Event Management working again including the ability to import a Hy-tek Events File (.hyv).  I have not gotten to the point where I can connect the events to a swim meet but I don’t think that will take too long.  I will likely release an update with the progress I have to date.  Even with Events unfinished, it actually does more than the old Events Model does.  I have also fixed a few other odds and ends that I’d like to make sure get released sooner rather than later.

More on Event Groups

As I continue to work away on Event Groups and Event Management overall, I have realized that what I had implemented earlier was really poorly thought out.  The way I had defined events and assigned them to a swim meet really isn’t very useful.  The Event model will change quite a bit as I flush this out.  It is possible that it will be necessary to delete any existing events and redefine them using the new model.  I haven’t completely worked it out yet but that is likely where I am headed.  It makes the code too ugly to try and deal with old data that really isn’t used for anything in the new model.

I hope to have a release soon which has the base functionality done since I’ve also fixed a few other odds and ends while I’ve been in the code.

Unintended Consequences …

Last night while I was at my daughter’s basketball practice I finished up modifying the Events functionality to account for the new events groups which will allow events to be bundled into logical groups.  As I was testing everything and things seemed good to go, I realized that the Drag-and-Drop event re-ordering won’t work correctly.

The DnD re-ordering assumes there is only one set of events so as the events are rearranged they are renumbered from 1-N.  This isn’t a show stopper but I will have to come up with a new solution.  In the process of playing around with some ideas I have determined that the jQuery plugin I was using has been updated to support touch so I have folded that in and everything which was working still works.

I had hoped to get a new release out this week but that is unlikely to happen at this point.  I am not going to release anything until I have the event reordering fixed unless I get a serious bug report in which case I’ll simply disable Drag-and-Drop reordering until I get it working again.

Preview of Event Groups

This morning I finished up the first phase of Event Groups.  The Event Groups tab will appear on the Management Menu.  The next step is to up date the Event functionality to recognize the new Event Groups.  When I roll this out this update it will require a database update which means deactivating the plugin and re-activating it.

Event Groups

I’ve started on the Event Groups idea I posted about last week. The more I think about this, the more I like it.  In my case, I have three distinct sets of events I have to worry about:  Short Course Yards, Short Course Meters, and our local Invitational which is also Short Course Yards but is a different set of events from what our league normally swims.

By “grouping” a set of events with a label (e.g. Short Course Yards), it will be trivial to assign a set of events to a swim meet.  I have decided to hold off on events import until Events Groups are done so a set of events can be assigned to a group upon import.

Re-Thinking Events

Nothing like a long flight to provide an opportunity to really look into wp-SwimTeam!  After fixing a couple more bugs, I started looking at Events as they are the foundation of meet entries.

A couple years ago I added Events to wp-SwimTeam but they don’t really do much.  It was the start of some new functionality that I never had the time to finish as fixing or enhancing other aspects of the plugin were always more important.

This season I really want to add the ability to generate a Meet Entries file directly from wp-SwimTeam.  In order to do that, the first order of business is to make sure the events associated with a swim meet can be managed.

Which brings me back to Events.  In looking at Events, the functionality I originally built is ok but has what I see as one pretty serious gap.  I allow the creation of a set of “Standard Events” –events which you can consider the base set of events that your team will swim most often, probably your home pool events.  This is ok because they can easily be added to an individual swim meet.

But what happens if you have a pool, like our home pool, which is measured in Meters and all of your opponents swim in Yards pools?  Even if the events are the same, you’d probably like to have a standard set of Meters Events and a standard set of Yards Events.  Now if I am going to manage two groups of Events, I might as well manage N groups of Events right?

I am toying with the idea of adding another field to the events table (Event Group) which would allow events to be assigned to a group.  Groups could be optionally defined (default to None).  Once Events are in a Group a Group of Events could easily be assigned to a swim meet.  Additional refinement at the swim meet level would still be supported.

I also plan to support the ability to import a Hy-tek Event File (.hyv) to either a specific meet or as a set of standard events.

I’ve got a couple more hours of flight time to noodle on this, we’ll see where it goes.

Can’t add new Swim Team Job?

I ran into a problem this past week that I am not sure will affect anyone else but my own swim team.  Our volunteer coordinator let me know that she was unable to add new jobs.  I couldn’t replicate the behavior in my development area which required me to debug it on the live server (ugh).

Because most of the things I add and/or changes I make to wp-SwimTeam are for the MacDolphins (but not always), I usually test them on the MacDolphins web site before releasing an update.  When I first added the Jobs module to wp-SwimTeam I had defined column names in the database table.  At some point I decided to be more descriptive with my names and changed the column names.  I think, but I can’t be sure, that I did this before publicly releasing the plugin update.  WordPress usually, but unfortunately not always, handles database schema changes correctly and will change column names.

In my case, WordPress, for whatever reason, didn’t change the column name, it defined a new one.  While this isn’t of itself a real problem, having a few unused columns in the database isn’t preferred, it isn’t a real big problem either.  Except that the default value for the column was never defined (oops) and at some point, MySQL (maybe MySQL5) started to care that the column wasn’t initialized.

The net result was we was we were unable to add new jobs because MySQL was returning an error message due to the uninitialized column that wp-SwimTeam wasn’t accounting for.  The simple solution for us was to simply delete the columns that shouldn’t have been there in the first place and won’t ever be there for people using the plugin now.

In the process of chasing this problem down, I found an area of my database interface where I wasn’t properly accounting for possible database errors.  I have updated the database interface class and the Jobs module which sits on top of it.  Over time I will also retrofit this change into other parts of the plugin as I work on them.

Look for a plugin update to be released in the next day or so.

wp-SwimTeam v1.13.669 available

This afternoon I posted an update to wp-SwimTeam.  You can get v1.13.669 from the download page or update from the WordPress plugin repository (recommended).  This update fixes several bugs:

  1. First and last name were displayed as “N/A” on the Users list on both the Swim Team tab and the Manage tab.
  2. The default values for “State or Province” and “Postal Code” were not stored correctly so in a new installation, the registration form would not work until these fields were set in the Options.
  3. Removed borders from sections of the Options->Swim Team form that were used for debugging the form layout and had inadvertently been left behind.   Some other minor tweaks to the layout were also made.
  4. Rudimentary 3.3.1 testing has been performed.

The update is already in the WordPress plugin repository so you should see notification on your Dashboard soon.

Season over, what next?

Our 2011 Summer Season is over and I will actually have some time to get back to work on wp-SwimTeam.  I find it hard to work on it during the season as I spend a lot of time doing swim team stuff.  Other than fixing something serious, I don’t have much free time to work on the plugin during the season.

But now the season is over and I won’t be working with our coach on line ups, spending time at the pool, etc, and I can spend some time on it again.  After our season there are a number of things I want to implement that I know we need for the MacDolphins:

  1. GUI improvements – there are a number of places the GUI can be confusing and needs some help.  I also hope to add some icons to make things a bit more intuitive.
  2. Export Meet Entries – all of the information can be stored with wp-SwimTeam, there is no reason why a Meet Entries file can’t be exported per the SDIF specification.
  3. Swimmer Reminders – similar to the volunteer reminder e-mails that can be sent in bulk, I plan to add the ability to send out swimmer reminder emails.  I am hoping that these reminder e-mails will improve the scratch process for us and eliminate our no-shows.
  4. Results – I have some work done (see the Flip-Turn demo) but do not have it integrated with wp-SwimTeam yet.  It isn’t complicated work but there is a lot of it to do.
  5. Hy-tek compatibility – there is some work done by others that should enable better Hy-tek compatibility.  I am hopeful that I can actually generate and/or process Hy3 and HYV files for entries, result, and events.
  6. New Theme – the MacDolphins theme needs to be updated.  It is based on the Sandbox theme and WordPress has evolved quite a bit since Sandbox was developed and even my extensions to Sandbox for the Sandbox-SwimTeam theme are showing their age.

wp-SwimTeam v1.10.651 now available

I have tracked down the problem that was causing the opt-in/opt-out list to be displayed incorrectly when called from the wpst_meet_report short code.  I have fixed the problem and made a new release available.  The release is now available from the Download page and has been committed to the WordPress Plugin Repository.  It should appear as an automatic update from the WordPress automatic update process in the next couple of hours.