@openinc/parse-server-opendash 2.4.82 → 2.4.83
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.
|
@@ -90,31 +90,47 @@ async function getTicketData(tickets) {
|
|
|
90
90
|
.query()
|
|
91
91
|
.find({ useMasterKey: true });
|
|
92
92
|
}
|
|
93
|
-
const downtimes =
|
|
94
|
-
const duedate =
|
|
95
|
-
const frequency =
|
|
96
|
-
const restriction =
|
|
97
|
-
const issuecategory =
|
|
98
|
-
const priority =
|
|
99
|
-
const source =
|
|
100
|
-
const state =
|
|
101
|
-
const dailySchedule =
|
|
102
|
-
const messages =
|
|
93
|
+
const downtimes = getDowntime(ticket);
|
|
94
|
+
const duedate = getDueDate(ticket);
|
|
95
|
+
const frequency = getFrequency(ticket);
|
|
96
|
+
const restriction = getRestriction(ticket);
|
|
97
|
+
const issuecategory = getIssueCategory(ticket);
|
|
98
|
+
const priority = getPriority(ticket);
|
|
99
|
+
const source = getTicketSource(ticket);
|
|
100
|
+
const state = getState(ticket);
|
|
101
|
+
const dailySchedule = getDailySchedule(ticket);
|
|
102
|
+
const messages = getMessages(ticket);
|
|
103
|
+
const dataPromises = await Promise.all([
|
|
104
|
+
downtimes,
|
|
105
|
+
duedate,
|
|
106
|
+
frequency,
|
|
107
|
+
restriction,
|
|
108
|
+
issuecategory,
|
|
109
|
+
priority,
|
|
110
|
+
source,
|
|
111
|
+
state,
|
|
112
|
+
dailySchedule,
|
|
113
|
+
messages,
|
|
114
|
+
]);
|
|
103
115
|
return {
|
|
104
116
|
ticket: ticket,
|
|
105
|
-
downtime:
|
|
106
|
-
duedate:
|
|
107
|
-
|
|
108
|
-
|
|
117
|
+
downtime: dataPromises[0].length > 0 ? dataPromises[0][0] : undefined,
|
|
118
|
+
duedate: dataPromises[1].length > 0 ? dataPromises[1][0] : undefined,
|
|
119
|
+
frequency: dataPromises[2].length > 0 ? dataPromises[2][0] : undefined,
|
|
120
|
+
restriction: dataPromises[3].length > 0 ? dataPromises[3][0] : undefined,
|
|
121
|
+
issuecategory: dataPromises[4].length > 0
|
|
122
|
+
? dataPromises[4][0]?.get("issuecategory")
|
|
109
123
|
: undefined,
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
state:
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
dailySchedule:
|
|
124
|
+
priority: dataPromises[5].length > 0 ? dataPromises[5][0] : undefined,
|
|
125
|
+
source: dataPromises[6].length > 0
|
|
126
|
+
? dataPromises[6][0]?.get("source")
|
|
127
|
+
: undefined,
|
|
128
|
+
state: dataPromises[7].length > 0
|
|
129
|
+
? dataPromises[7][0]?.get("state")
|
|
130
|
+
: undefined,
|
|
131
|
+
dailySchedule: dataPromises[8],
|
|
132
|
+
messages: dataPromises[9].messages,
|
|
133
|
+
messageBodies: dataPromises[9].messageBodies,
|
|
118
134
|
assignedTo: [...assignedusers, ...assignedroles],
|
|
119
135
|
};
|
|
120
136
|
});
|