@manyos/smileconnect-api 1.53.1 → 1.53.2
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/conf/clients.json +31 -0
- package/conf/customFormMapping.json +45 -0
- package/docs/releases.md +4 -1
- package/package.json +1 -1
- package/util/mappingUtil.js +4 -1
package/conf/clients.json
CHANGED
|
@@ -161,6 +161,37 @@
|
|
|
161
161
|
"Full Name"
|
|
162
162
|
]
|
|
163
163
|
},
|
|
164
|
+
"custom_TMS:Task": {
|
|
165
|
+
"basequery": "1=1",
|
|
166
|
+
"fields": [
|
|
167
|
+
"Task ID",
|
|
168
|
+
"Summary",
|
|
169
|
+
"z1D_WorkInfoNotes",
|
|
170
|
+
"Notes",
|
|
171
|
+
"Assignee Group",
|
|
172
|
+
"Assignee Group ID",
|
|
173
|
+
"Assignee Organization",
|
|
174
|
+
"Support Company",
|
|
175
|
+
"Status"
|
|
176
|
+
],
|
|
177
|
+
"constants": [],
|
|
178
|
+
"scripts": {
|
|
179
|
+
"GET": {
|
|
180
|
+
"preMapping": [],
|
|
181
|
+
"postMapping": []
|
|
182
|
+
},
|
|
183
|
+
"PUT": {
|
|
184
|
+
"preMapping": [],
|
|
185
|
+
"postMapping": [],
|
|
186
|
+
"afterExecution": []
|
|
187
|
+
},
|
|
188
|
+
"POST": {
|
|
189
|
+
"preMapping": [],
|
|
190
|
+
"postMapping": [],
|
|
191
|
+
"afterExecution": []
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
},
|
|
164
195
|
"cmdbobject": {
|
|
165
196
|
"basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
166
197
|
"fields": [
|
|
@@ -19,6 +19,51 @@
|
|
|
19
19
|
"Department": "Department"
|
|
20
20
|
}
|
|
21
21
|
},
|
|
22
|
+
"Tasks": {
|
|
23
|
+
"formName": "TMS:Task",
|
|
24
|
+
"mapping": {
|
|
25
|
+
"Summary": "summary",
|
|
26
|
+
"Task ID": "id",
|
|
27
|
+
"Notes": "notes",
|
|
28
|
+
"Status": "status",
|
|
29
|
+
"StatusReasonSelection": "statusReason",
|
|
30
|
+
"Actual Start Date": "actualStartDate",
|
|
31
|
+
"Actual End Date": "actualEndDate",
|
|
32
|
+
"Scheduled Start Date": "scheduledStartDate",
|
|
33
|
+
"Scheduled End Date": "scheduledEndDate",
|
|
34
|
+
"InstanceId": "instanceId",
|
|
35
|
+
"RootRequestFormName": "rootRequestForm",
|
|
36
|
+
"RootRequestID": "rootRequest",
|
|
37
|
+
"Sequence": "sequence",
|
|
38
|
+
"Service Cat Tier 1": "opsCat1",
|
|
39
|
+
"Service Cat Tier 2": "opsCat2",
|
|
40
|
+
"Service Cat Tier 3": "opsCat3",
|
|
41
|
+
"Product Cat Tier 1": "prodCat1",
|
|
42
|
+
"Product Cat Tier 2": "prodCat2",
|
|
43
|
+
"Product Cat Tier 3": "prodCat3",
|
|
44
|
+
"Product Name": "productName",
|
|
45
|
+
"Assignee Group ID": "assignedGroup",
|
|
46
|
+
"Customer Person ID": "customerid",
|
|
47
|
+
"Requested By Person ID": "requestorid",
|
|
48
|
+
"Support Company": "supportCompany",
|
|
49
|
+
"Assignee Organization": "supportOrganization",
|
|
50
|
+
"Assignee Group": "supportGroup",
|
|
51
|
+
"TemplateID": "templateid",
|
|
52
|
+
"TaskName": "taskName",
|
|
53
|
+
"z1D_WorkInfoNotes": "workInfoNotes",
|
|
54
|
+
"z1D_WorkInfoSummary": "workInfoSummary",
|
|
55
|
+
"z1D_WorkInfoType": "workInfoType",
|
|
56
|
+
"z1D_WorkInfoViewAccess": "workInfoViewAccess",
|
|
57
|
+
"z1D_WorkInfoSecureLog": "workInfoSecureLog",
|
|
58
|
+
"Incident Resolution": "incidentResolution",
|
|
59
|
+
"Incident Resolution2": "incidentResolution2",
|
|
60
|
+
"z1D Action": "action",
|
|
61
|
+
"Assignee": "assignee",
|
|
62
|
+
"Assignee Login": "assigneeLogin",
|
|
63
|
+
"Assigned To": "assignedTo",
|
|
64
|
+
"Assignee Id": "assigneeID"
|
|
65
|
+
}
|
|
66
|
+
},
|
|
22
67
|
"baseElement": {
|
|
23
68
|
"formName": "AST:BaseElement",
|
|
24
69
|
"mapping": {
|
package/docs/releases.md
CHANGED
package/package.json
CHANGED
package/util/mappingUtil.js
CHANGED
|
@@ -106,11 +106,14 @@ function getFieldsForCreate(mapping, mappingNew, clientFields) {
|
|
|
106
106
|
}*/
|
|
107
107
|
|
|
108
108
|
function applyCustomFormMapping(object, mapping, requestIdField) {
|
|
109
|
+
//log.debug('apply mapping', object, mapping)
|
|
109
110
|
//Apply mapping
|
|
110
111
|
Object.keys(mapping).forEach(remedyName => {
|
|
111
112
|
try {
|
|
112
113
|
const mappedName = mapping[remedyName]
|
|
113
|
-
|
|
114
|
+
if (object[remedyName] !== undefined) {
|
|
115
|
+
Object.defineProperty(object, mappedName, Object.getOwnPropertyDescriptor(object, remedyName));
|
|
116
|
+
}
|
|
114
117
|
//delete only if names are different
|
|
115
118
|
if (mappedName !== remedyName) {
|
|
116
119
|
delete object[remedyName];
|