@manyos/smileconnect-api 1.41.2 → 1.41.3

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.
@@ -50,7 +50,9 @@ async function createWorklog(ticketConfig, clientConfig, ticketId, data, globalS
50
50
  }
51
51
 
52
52
  const clientConstants = clientConfig[ticketConfig.requestTypeWorkLog].constants;
53
- if (data.isPublic) {
53
+ const viewAccessConstant = clientConstants.find(element => element.name === "View Access")
54
+ //run only if isPublic is set and no Constant is defined
55
+ if (data.isPublic && !viewAccessConstant) {
54
56
  if (data.isPublic === true) {
55
57
  clientConstants.push({"name": "View Access", "value" : "Public"});
56
58
  } else {
package/docs/releases.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  ## API
4
4
 
5
- ### 1.41.2 - 10.08.21
5
+ ### 1.41.3 - 10.08.21
6
6
 
7
7
  Fix mapping for Ticket Worklogs
8
8
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.41.2",
3
+ "version": "1.41.3",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {
@@ -273,7 +273,7 @@ describe('Integration Tests - Workorders', function () {
273
273
  chai.request(server)
274
274
  .post(`/v1/workorders/${workorder.id}/worklogs`)
275
275
  .set('Authorization', 'Bearer ' + authUser.access_token)
276
- .send({data: {summary: "Worklog Summary", text: "Worklog Text", viewAccess: "Internal"}})
276
+ .send({data: {summary: "Worklog Summary", text: "Worklog Text", isPublic: true}})
277
277
  .end(function (err, res) {
278
278
  res.should.have.status(200);
279
279
  res.body.data.should.be.an('object');