Fixes to make board showing correctly.

Thanks to xet7 !
This commit is contained in:
Lauri Ojansivu 2025-10-12 03:48:21 +03:00
parent ffb02fe0ec
commit bd8c565415
33 changed files with 2372 additions and 2747 deletions

View file

@ -315,10 +315,10 @@ if (Meteor.isServer) {
fs.mkdirSync(storagePath, { recursive: true });
}
});
// Add backward compatibility methods
Attachments.getAttachmentWithBackwardCompatibility = getAttachmentWithBackwardCompatibility;
Attachments.getAttachmentsWithBackwardCompatibility = getAttachmentsWithBackwardCompatibility;
}
// Add backward compatibility methods - available on both client and server
Attachments.getAttachmentWithBackwardCompatibility = getAttachmentWithBackwardCompatibility;
Attachments.getAttachmentsWithBackwardCompatibility = getAttachmentsWithBackwardCompatibility;
export default Attachments;

View file

@ -331,6 +331,19 @@ Boards.attachSchema(
optional: true,
defaultValue: null,
},
migrationVersion: {
/**
* The migration version of the board structure.
* New boards are created with the latest version and don't need migration.
*/
type: Number,
// eslint-disable-next-line consistent-return
autoValue() {
if (this.isInsert && !this.isSet) {
return 1; // Latest migration version for new boards
}
},
},
subtasksDefaultListId: {
/**
@ -2196,6 +2209,7 @@ if (Meteor.isServer) {
],
permission: req.body.permission || 'private',
color: req.body.color || 'belize',
migrationVersion: 1, // Latest version - no migration needed
});
const swimlaneId = Swimlanes.insert({
title: TAPi18n.__('default'),

View file

@ -50,7 +50,7 @@ class MeteorMongoIntegration {
this.overrideMongoCollection();
this.isInitialized = true;
console.log('Meteor MongoDB Integration initialized successfully');
// Meteor MongoDB Integration initialized successfully (status available in Admin Panel)
}
/**
@ -296,11 +296,8 @@ export { meteorMongoIntegration, MeteorMongoIntegration };
// Auto-initialize if MONGO_URL is available
if (Meteor.isServer && process.env.MONGO_URL) {
console.log('Auto-initializing Meteor MongoDB Integration with MONGO_URL');
// Auto-initializing Meteor MongoDB Integration with MONGO_URL (status available in Admin Panel)
meteorMongoIntegration.initialize(process.env.MONGO_URL);
}
// Log initialization
if (Meteor.isServer) {
console.log('Meteor MongoDB Integration module loaded');
}
// Meteor MongoDB Integration module loaded (status available in Admin Panel)

View file

@ -288,7 +288,4 @@ const mongodbConnectionManager = new MongoDBConnectionManager();
// Export for use in other modules
export { mongodbConnectionManager, MongoDBConnectionManager };
// Log initialization
if (Meteor.isServer) {
console.log('MongoDB Connection Manager initialized');
}
// MongoDB Connection Manager initialized (status available in Admin Panel)

View file

@ -270,8 +270,4 @@ const mongodbDriverManager = new MongoDBDriverManager();
// Export for use in other modules
export { mongodbDriverManager, MongoDBDriverManager };
// Log initialization
if (Meteor.isServer) {
console.log('MongoDB Driver Manager initialized');
console.log(`Supported MongoDB versions: ${mongodbDriverManager.getSupportedVersions().join(', ')}`);
}
// MongoDB Driver Manager initialized (status available in Admin Panel)

View file

@ -1850,7 +1850,7 @@ if (Meteor.isServer) {
},
});
Accounts.onCreateUser((options, user) => {
const userCount = ReactiveCache.getUsers({}, {}, true).countDocuments();
const userCount = ReactiveCache.getUsers({}, {}, true).count();
user.isAdmin = userCount === 0;
if (user.services.oidc) {