@openinc/parse-server-opendash 3.29.12 → 3.29.13

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.
@@ -4,6 +4,7 @@ exports.init = init;
4
4
  const initIssuecategory_1 = require("./issuecategory/initIssuecategory");
5
5
  const initKanbanStates_1 = require("./kanbanState/initKanbanStates");
6
6
  const initMessages_1 = require("./messages/initMessages");
7
+ const initSchedulesFeature_1 = require("./schedules/initSchedulesFeature");
7
8
  const checkStatus_1 = require("./schedules/mappings/checkStatus");
8
9
  const reassignScheduleExecutions_1 = require("./schedules/mappings/reassignScheduleExecutions");
9
10
  const initTicket_1 = require("./ticket/initTicket");
@@ -18,5 +19,6 @@ async function init() {
18
19
  await (0, initTicket_1.initTicketClass)();
19
20
  await (0, reassignScheduleExecutions_1.reassignScheduleExecutions)();
20
21
  await (0, checkStatus_1.checkStatus)();
22
+ await (0, initSchedulesFeature_1.initSchedulesFeature)();
21
23
  console.log("open.SERVICE feature initialized.");
22
24
  }
@@ -0,0 +1 @@
1
+ export declare function initSchedulesFeature(): Promise<void>;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.initSchedulesFeature = initSchedulesFeature;
4
+ const types_1 = require("../../../types");
5
+ async function initSchedulesFeature() {
6
+ updateFiinishedSchedules();
7
+ }
8
+ async function updateFiinishedSchedules() {
9
+ const executionsToUpdate = await new Parse.Query(types_1.Maintenance_Schedule_Execution)
10
+ .exists("finishedAt")
11
+ .notEqualTo("status", "completed")
12
+ .find({ useMasterKey: true });
13
+ for (const execution of executionsToUpdate)
14
+ execution.set("status", "completed");
15
+ await types_1.Maintenance_Schedule_Execution.saveAll(executionsToUpdate, {
16
+ useMasterKey: true,
17
+ });
18
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openinc/parse-server-opendash",
3
- "version": "3.29.12",
3
+ "version": "3.29.13",
4
4
  "description": "Parse Server Cloud Code for open.INC Stack.",
5
5
  "packageManager": "pnpm@10.20.0",
6
6
  "keywords": [