@manyos/smileconnect-api 1.45.6 → 1.45.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.
|
@@ -59,9 +59,13 @@ async function createTask(clientConfig, rootForm, rootRequestId, taskData, creat
|
|
|
59
59
|
|
|
60
60
|
fields.push('TaskName', 'RootRequestInstanceId', 'TaskType', 'Status', 'RootRequestFormName', 'RootRequestMode', 'RootRequestName', 'sequence')
|
|
61
61
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
|
|
63
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
64
|
+
const thisTask = allTaskFinal[x]
|
|
65
|
+
//run preScripts
|
|
66
|
+
if (scripts && scripts.preMapping) {
|
|
67
|
+
await scriptController.runScripts(scripts.preMapping, thisTask, clientConfig.clientId, globalScriptParams);
|
|
68
|
+
}
|
|
65
69
|
}
|
|
66
70
|
|
|
67
71
|
allTaskFinal = mappingUtil.applyMapping2Remedy(allTaskFinal, mapping, clientConfig.task.constants, fields);
|
|
@@ -77,18 +81,24 @@ async function createTask(clientConfig, rootForm, rootRequestId, taskData, creat
|
|
|
77
81
|
thisTask.sequence = thisTask.Sequence || "1";
|
|
78
82
|
});
|
|
79
83
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
84
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
85
|
+
const thisTask = allTaskFinal[x]
|
|
86
|
+
//run postScripts
|
|
87
|
+
if (scripts && scripts.postMapping) {
|
|
88
|
+
await scriptController.runScripts(scripts.postMapping, thisTask, clientConfig.clientId, globalScriptParams);
|
|
89
|
+
}
|
|
83
90
|
}
|
|
84
91
|
|
|
85
92
|
const taskResult = await arquery.createEntry('TMS:Task', allTaskFinal, clientConfig.options)
|
|
86
93
|
const taskId = taskResult['0'];
|
|
87
94
|
globalScriptParams.id2 = taskId;
|
|
88
95
|
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
96
|
+
for (let x=0; x< allTaskFinal.length; x++) {
|
|
97
|
+
const thisTask = allTaskFinal[x]
|
|
98
|
+
//run afterExecution
|
|
99
|
+
if (scripts && scripts.afterExecution) {
|
|
100
|
+
await scriptController.runScripts(scripts.afterExecution, thisTask, clientConfig.clientId, globalScriptParams);
|
|
101
|
+
}
|
|
92
102
|
}
|
|
93
103
|
|
|
94
104
|
log.debug('Create Task Result', taskResult);
|
|
@@ -420,7 +420,12 @@ function doesTicketRelationExists(ticketRelations, newRelation) {
|
|
|
420
420
|
|
|
421
421
|
async function updateRelations(ticketConfig, userConfig, ticketId, relations) {
|
|
422
422
|
log.debug('Checker', {ticketConfig, userConfig, ticketId, relations});
|
|
423
|
-
//
|
|
423
|
+
// Remove Ticket Relations if task
|
|
424
|
+
if (ticketConfig.assocTicketType === 'Task') {
|
|
425
|
+
relations.ticketRelations = undefined
|
|
426
|
+
}
|
|
427
|
+
|
|
428
|
+
//Check CI Relations
|
|
424
429
|
if (relations && relations.ciRelations && Array.isArray(relations.ciRelations)) {
|
|
425
430
|
const existingRelations = await getTicketCIRelations(ticketId);
|
|
426
431
|
log.debug('foundRelations', existingRelations);
|
package/docs/releases.md
CHANGED
|
@@ -2,7 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
## API
|
|
4
4
|
|
|
5
|
-
### 1.45.
|
|
5
|
+
### 1.45.8 - 11.10.21
|
|
6
|
+
Fix issue: Ignore Ticketrelations for Task Update & Create
|
|
7
|
+
|
|
8
|
+
### 1.45.7 - 05.10.21
|
|
6
9
|
Fix issue: Use normal Task mapping for new tasks and existing tasks as no Interface Create Form is used.
|
|
7
10
|
|
|
8
11
|
### 1.45.2 - 05.10.21
|