@tiledesk/tiledesk-server 2.11.6 → 2.11.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md
CHANGED
@@ -5,6 +5,12 @@
|
|
5
5
|
🚀 IN PRODUCTION 🚀
|
6
6
|
(https://www.npmjs.com/package/@tiledesk/tiledesk-server/v/2.3.77)
|
7
7
|
|
8
|
+
# 2.11.8
|
9
|
+
- Added: migration file to migrate namespace engine
|
10
|
+
|
11
|
+
# 2.11.7
|
12
|
+
- Hotfix: solved bug on findProjectUsersAllAndAvailableWithOperatingHours_group on searching group
|
13
|
+
|
8
14
|
# 2.11.6
|
9
15
|
- Added: possibility to enable/disable groups
|
10
16
|
- Updated: delete project user endpoint to logical delete
|
@@ -0,0 +1,31 @@
|
|
1
|
+
var winston = require('../config/winston');
|
2
|
+
const { Namespace } = require('../models/kb_setting');
|
3
|
+
|
4
|
+
async function up () {
|
5
|
+
|
6
|
+
if (!process.env.PINECONE_INDEX || !process.env.PINECONE_TYPE) {
|
7
|
+
winston.error("Namespace engine migration STOPPED. PINECONE_TYPE or PINECONE_INDEX undefined.");
|
8
|
+
return;
|
9
|
+
}
|
10
|
+
|
11
|
+
let engine = {
|
12
|
+
name: "pinecone",
|
13
|
+
type: process.env.PINECONE_TYPE,
|
14
|
+
apikey: "",
|
15
|
+
vector_size: 1536,
|
16
|
+
index_name: process.env.PINECONE_INDEX
|
17
|
+
};
|
18
|
+
|
19
|
+
try {
|
20
|
+
const updates = await Namespace.updateMany(
|
21
|
+
{ engine: { $exists: false } },
|
22
|
+
{ engine: engine }
|
23
|
+
);
|
24
|
+
winston.info("Schema updated for " + updates.nModified + " namespace");
|
25
|
+
} catch (err) {
|
26
|
+
winston.error("Error updating namespaces in migration:", err);
|
27
|
+
throw err;
|
28
|
+
}
|
29
|
+
}
|
30
|
+
|
31
|
+
module.exports = { up };
|
package/package.json
CHANGED
@@ -359,8 +359,7 @@ getOperators(departmentid, projectid, nobot, disableWebHookCall, context) {
|
|
359
359
|
var that = this;
|
360
360
|
|
361
361
|
return new Promise(function (resolve, reject) {
|
362
|
-
|
363
|
-
return Group.find({ _id: department.id_group, enabled: true }).exec(function (err, group) {
|
362
|
+
return Group.find({ _id: department.id_group, $or: [ { enabled: true }, { enabled: { $exists: false } } ] }).exec(function (err, group) {
|
364
363
|
if (err) {
|
365
364
|
winston.error('D-2 GROUP -> [ FIND PROJECT USERS: ALL and AVAILABLE (with OH) ] -> ERR ', err)
|
366
365
|
return reject(err);
|