@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
|
-
|
|
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
package/package.json
CHANGED
package/test/workorderTest.js
CHANGED
|
@@ -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",
|
|
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');
|