mirror of
https://github.com/wekan/wekan.git
synced 2025-12-18 00:10:13 +01:00
When opening board, migrate from Shared Lists to Per-Swimlane Lists.
Thanks to xet7 ! Fixes #5952
This commit is contained in:
parent
48b645ee1e
commit
1e6252de7f
8 changed files with 112 additions and 219 deletions
|
|
@ -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({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue