When opening board, migrate from Shared Lists to Per-Swimlane Lists.

Thanks to xet7 !

Fixes #5952
This commit is contained in:
Lauri Ojansivu 2025-10-20 00:22:26 +03:00
parent 48b645ee1e
commit 1e6252de7f
8 changed files with 112 additions and 219 deletions

View file

@ -152,32 +152,10 @@ BlazeComponent.extendComponent({
'click .js-log-in'() {
FlowRouter.go('atSignIn');
},
'click .js-restore-legacy-lists'() {
this.restoreLegacyLists();
},
},
];
},
restoreLegacyLists() {
// Show confirmation dialog
if (confirm('Are you sure you want to restore legacy lists to their original shared state? This will make them appear in all swimlanes.')) {
// Call cron method to restore legacy lists
Meteor.call('cron.triggerRestoreLegacyLists', (error, result) => {
if (error) {
console.error('Error restoring legacy lists:', error);
alert(`Error: ${error.message}`);
} else {
console.log('Successfully triggered restore legacy lists migration:', result);
alert(`Migration triggered successfully. Job ID: ${result.jobId}`);
// Refresh the board to show the restored lists
setTimeout(() => {
window.location.reload();
}, 2000);
}
});
}
},
}).register('boardHeaderBar');
Template.boardHeaderBar.helpers({