@manyos/smileconnect-api 1.49.0 → 1.49.1

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.
@@ -16,7 +16,7 @@
16
16
  "Class Location": "location",
17
17
  "Class Start Date & Time": "startDate",
18
18
  "Class Cost": "cost",
19
- "Department": "department"
19
+ "Department": "Department"
20
20
  }
21
21
  },
22
22
  "baseElement": {
package/docs/releases.md CHANGED
@@ -2,6 +2,9 @@
2
2
 
3
3
  ## API
4
4
 
5
+ ### 1.49.1 - 04.11.21
6
+ Fix issue: Self Mapping in custom Forms removed attribute
7
+
5
8
  ### 1.49.0 - 04.11.21
6
9
  Add attachmentScripts to Worklogs
7
10
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.49.0",
3
+ "version": "1.49.1",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -97,7 +97,10 @@ function applyCustomFormMapping(object, mapping, requestIdField) {
97
97
  try {
98
98
  const mappedName = mapping[remedyName]
99
99
  Object.defineProperty(object, mappedName, Object.getOwnPropertyDescriptor(object, remedyName));
100
- delete object[remedyName];
100
+ //delete only if names are different
101
+ if (mappedName !== remedyName) {
102
+ delete object[remedyName];
103
+ }
101
104
  } catch (e) {
102
105
  log.error('mappingError', e)
103
106
  }
@@ -129,7 +132,9 @@ function applyCustomFormMapping2Remedy(entryData, mapping, constants, fields) {
129
132
  try {
130
133
  const mappedName = mapping[remedyName]
131
134
  Object.defineProperty(entryData, remedyName, Object.getOwnPropertyDescriptor(entryData, mappedName));
132
- delete entryData[mappedName];
135
+ if (mappedName !== remedyName) {
136
+ delete entryData[mappedName];
137
+ }
133
138
  } catch (e) {
134
139
  log.error('mappingError', e)
135
140
  }