Migration Step name issues


We tried our migration. We first tried to migrate from 1.6 to 2.x and that didn’t work.
So we have a lot of steps with (a 300+ over 10+ projects) with the characters: [ and ] and :

Is there a work around, so wo do not have to manually edit them all?

In the attached logfile you’ll see an example of the errors with the : - error.

We can all import them in the 2.0 octopus but not on the 2.3 octopus;

But when we try to import them on the we do not get any mistakes. But we cannot edit any steps.

migrationlog.txt (64 KB)

Hi Kristof,

There is an automated way to do it, you’ve found half of the solution which is to migrate first into 2.0. The second half is at the end of this thread:


You will have to run the script multiple times, replacing:

var repl = '-';
  • with the character you want to update.

You should then be able to upgrade to 2.3.

Sorry about the hassle; I’m going to automate this in the migrator now but that won’t be available until 2.4 so this is the best solution available until then.

Hope this helps.

Hi Nicholas,

I’m a colleague of Kristof.

The script worked fine for us. However, we had to tweak it a little bit since javascript only replaces the first occurrence calling the replace method.

Below you can find the script we used. Note that we’re also using an array so we could define multiple characters to replace.

Kind regards

var client = Octopus.App.Client;
var slug = ‘storefront’;
var orig = [’:’, ‘?’];
var repl = [’-’, ‘.’];
var myRegex;

client.get(’/api/projects/’ + slug).then(function(project){
_.each(process.Steps, function(step){
for(var i = orig.length-1; i >= 0; i–) {
myRegex = new RegEx(orig[i], ‘g’);
step.Name = step.Name.replace(myRegex, repl[i]);
_.each(step.Actions, function(action){
for(var i = orig.length-1; i >= 0; i–) {
myRegex = new RegEx(orig[i], ‘g’);
action.Name = action.Name.replace(myRegex, repl[i]);
client.put(process.Links.Self, process).then(function(saved){