While Wizards vs Aliens ultimately became the replacement in production terms to The Sarah Jane Adventures but as I found out from reading DWM’s The Sarah Jane Companion Volume 3 that the idea for Wizards vs Aliens came about just before Lis Sladen passed away.
This is because while Lis Sladen had completed the first half of what turned out to be the final season of SJA she had informed the production team that she was too ill to go on with the second half of the season.
Lis Sladen however did not let anyone know outside her family just how ill she was and so the production team postponed production on SJA thinking that it will be resumed when Lis Sladen had recovered from her illness.
This is where Wizards vs Aliens came in as it became something for the SJA production team to work on whilst SJA was having its break from filming.
Sadly as it turned out Wizards vs Aliens did not become SJA’s stopgap replacement but its more permanent replacement with Lis Sladen’s passing.