Skip to content

Commit

Permalink
[#254] Allow migration of templates created in 2.0
Browse files Browse the repository at this point in the history
These templates had one field less, because onsite was added in 2.1.
  • Loading branch information
jaragunde committed May 30, 2017
1 parent 8ddd607 commit 2a16af6
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions web/migrate-templates.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,14 @@
newTemplate.set('story', t[3]);
newTemplate.set('taskStoryId', t[4]);
newTemplate.set('telework', t[5]);
newTemplate.set('onsite', t[6]);
newTemplate.set('name', t[7]);
if (t.length == 7) {
// it is a template from 2.0, without "onsite" field
newTemplate.set('name', t[6]);
}
else {
newTemplate.set('onsite', t[6]);
newTemplate.set('name', t[7]);
}

store.add(newTemplate);
});
Expand Down

0 comments on commit 2a16af6

Please sign in to comment.