wp-SwimTeam v1.32.931 now available

After a few days of testing on the MacDolphins site without any issues, I have decided to go ahead and release v1.32.931.  There are no changes between this build and the beta build except the version number and the removal of the beta tag.

The primary feature in this update is new SQL which addresses performance problems when working with user data, particularly when is relates to swimmers.  The Job Commitment Report was particularly noticeable in how slow it was (4-5 minutes) if it completed at all.  The SQL addresses that performance problem however since it used extensively across the plugin I wanted to make sure I hadn’t broken something else.

You can find the update on the Download & Installation page or in the WordPress Plugin Repository.

Beta build of v1.32 available

This evening I posted an early build of wp-SwimTeam v1.32.  You can download and manually install it if you would like to try it.  This build introduces new SQL to address some pretty serious performance problems querying user data as it relates to swimmers.

For several weeks our Swim Team Chair has been telling me there is a problem with the Job Commitment Report.  I have been chasing this problem only to have it “go away” and start working correctly.  I finally figure out that it was related to the large number of users registered with the site (we have almost 300).  I was able  replicate the problem by creating a large number of dummy users in my development database.  The manifestation of the problem was most evident on the Job Commitments Report.  The page would “go away” and give the appearance of a hung process. In some cases the report would finish but might take 4-5 minutes (ugh), in others it would timeout and return an error.

I had to solve a similar problem for the Email Users plugin last week so once I figured that one out, it dawned on me what the problem with wp-SwimTeam might be.  Fixing it in wp-SwimTeam is a little more involved because of the database table relationships are a little more complicated.  I’ve learned a lot about JOIN ON this week and this beta release represents completely new SQL for querying user data.

I’ve been through all of the tabs and forms at least once but there is a chance I’ve missed something.  I am running this beta build on the MacDolphins web site and if I don’t run into anything over the next few days, I’ll go ahead and release it.

Download:  [download#14]

If you run into any problems, please let me know.  I’d like to release this update in the next day or so.

The Magic of the get_users() Function

While working on Email Users recently I encountered a performance problem with some SQL which I had received via the WordPress Hackers Mailing List back in January of 2008.  At the time I needed it for my wp-SwimTeam plugin (where I am still using it) and it served me well.  When I first committed a patch for Email Users (v3.4.0) I used this SQL to allow sorting of the users as prior to v3.4.0, only the usernames were displayed.

It turns out this SQL is pretty inefficient (I am by no means an SQL expert) and it was causing performance problems for people using Email Users with a large number of users.  Again I turned to the WP Hackers Mailing List and received some significantly improved SQL.

The ensuing discussion also recommended migrating my SQL to the WordPress API get_users() function.  I am all for using the API when I can as it is much safer and typically much easier to work with.  In this case, I couldn’t understand how it would help me retrieve the first and last names from the Meta table that I needed.  It wasn’t mentioned anywhere in the Codex so I was confused.

A subsequent post in the thread mentioned the “magic” of get_users() which I then tried and sure enough, the data I wanted was available.  Ok, now I am really confused.  Where does this magic data come from.  Fortunately another post referenced this article which explains how these magic methods work and why the data is available.  This is pretty neat and very useful although I have no idea how developers would know this exists based on the documentation in the Codex.

These “magic methods” strike me as one of those “inside baseball” things that not being a full time WordPress developer I’d never know about.  It is very useful and something I’ll certainly remember and use in the future.  Thanks to the WordPress Hackers Mailing List – an incredibly valuable resource.

wp-SwimTeam v1.31.918 now available

This morning I released an update for wp-SwimTeam.  This version addresses a few issues and completes the Hy-tek Team Manager Roster Import functionality.  You can find it on the Download and Installation page or through the WordPress Dashboard and the Plugin Repository.

  • Completed Hy-tek Roster export. All fields that can be mapped into some sort of logical Hy-tek Team Manager field are now supported. TM supports up to three custom fields in the roster import file, if optional swimmer fields are enabled, the first three (or fewer) will be mapped into the corresponding TM custom field.
  • Fixed bug where in some instances, the first name would be blank.
  • Fixed alignment (right instead of left) of Swimmer Id field on SDIF F0 records in entries export.
  • Fixed minor white space issue in PHP source code which in some cases seems to cause the Job Commitment Report to hang.

wp-SwimTeam and WordPress 3.4

I see on my Dashboard that WordPress 3.4 is out today.  I knew it would be out soon as I follow the WordPress Hackers and WordPress Testers mailing lists but have not done anything with it yet.  In the past I have tried to do a basic smoke test against one of the release candidates before the final release is out but this time I haven’t had the time to do it.

So the answer to “will it work?” is “I don’t know!”.  I realize that isn’t a very good answer and I will try to test it in the next few days.  My recommendation is to hold off until I’ve done some basic testing.  I am not aware of anything that will break based on what I know is coming but until I test it, you never know!

Early build of wp-SwimTeam v1.31 now available

This afternoon I posted an early build of wp-SwimTeam v1.31.  You can download and manually install it if you want to try it.  This build completes the work for exporting the roster to Hy-tek Team Manager.  All of the swimmer and parent fields that can be logically mapped into the Team Manager Athlete profile have been mapped.  I was even able to map some of the Swimmer Optional fields (if they’re used) as Hy-tek Team Manager supports importing up to three custom fields.

Download:  [download#14]

If you run into any problems, please let me know.  I’d like to release this update in the next day or so.

I am now contributing to the E-Mail Users plugin

I am happy to say that I have been granted Subversion commit access to the popular Email Users plugin.  I have been using this plugin for a number of years and have submitted several patches which were included in the 3.4.x releases.  Recently I needed to add some functionality to support the MacDolphins web site and use of the plugin and after submitting a patch, I was invited to be a contributor by Vincent Prat at Marvin Labs which I gladly accepted.

The 4.0.0 release of Email Users is a pretty substantial change.  It updates the plugin to use the WordPress Options API and updated menu API.  It also adds a new feature that allows easy access to managing the email options for one or more users.  No more visiting the User Profile for each user, bulk actions are now available!

More to come over the next few days.

wp-SwimTeam v1.30.906 addresses entries export bug

In the processes of getting ready for our first meet I found some swimmers who had scratched still appeared in the entries SDIF file.  Odd, this isn’t supposed to be.  Looking into the problem I found that only Freestyle was being processed correctly, all other strokes were not being recognized for Opt-In or Opt-Out.

I have fixed this bug and uploaded a new version as well as pushed it to the WordPress plugin repository.

wp-SwimTeam v1.29.903 now available

I have just pushed out v1.29.903 of wp-SwimTeam.  This update addresses a couple of bugs, notably with the Job Commitments report, and adds some new functionality.

New in v1.29:

  • Fixed bug which prevented the Job Commitment report from running correctly.
  • Fixed bug which caused “$credit” to appear in the CSV version of the Job Committment Report instead of the actual number.
  • Added new option to set initial value on swimmer labels with numeric sequences.
  • Fixed bug with SDIF profile when Geography was set to US which resulted in a broken form.
  • Elimited some debug code which generated output when exporting entries.

Also included in this build are all of the changes included in the v1.28 beta release which I never formally made available.

  • Added button to Swim Team User Profile form to quickly open user’s WordPress User Profile form.
  • Tidied up several of the reports to make them consistent. Each should now display the HTML report on screen when exporting another format.
  • Re-implemented download solution for actions which generate downloadable files (e.g. CSV, SDIF, etc.)
  • Phase 1 of Hy-tek HY3 export support. Roster can be exported in HY3 format which imports into Hy-tek Team Manager.
  • Fixed bug which enabled job signup for all users regardless of setting on Jobs Options tab.

This update has been committed to the WordPress Plugin Repository and should appear on your WordPress Dashboard shortly and is also available from the Download and Installation page.