@manyos/smileconnect-api 1.43.0 → 1.44.0

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 CHANGED
@@ -293,10 +293,6 @@
293
293
  {
294
294
  "name": "Communication Source",
295
295
  "value": "Other"
296
- },
297
- {
298
- "name": "View Access",
299
- "value": "Internal"
300
296
  }
301
297
  ],
302
298
  "basequery": "",
@@ -483,7 +483,7 @@ function getTicketConfigByTicketType(ticketType) {
483
483
  function getCIData(instanceId) {
484
484
  log.debug('Search for CI', instanceId);
485
485
  //get only CIs with recon
486
- const query = `'InstanceId'="${instanceId}" AND 'ReconciliationIdentity' != $NULL$ AND 'ReconciliationIdentity' != "0"`;
486
+ const query = `('InstanceId'="${instanceId}" OR ('ReconciliationIdentity' = "${instanceId}" AND 'DatasetId' = "BMC.ASSET")) AND 'ReconciliationIdentity' != $NULL$ AND 'ReconciliationIdentity' != "0"`;
487
487
  const form = CONSTANTS.FORM_CMDB_CI_BASE;
488
488
  return utilCache.get(form + ':' + query, function () {
489
489
  return new Promise((resolve, reject) => {
@@ -12,7 +12,7 @@ const scriptController = require('./scriptController');
12
12
  const ticketCache = new CacheService(process.env.CACHETTL_TICKETS || 1); // Create a new cache service instance
13
13
 
14
14
  async function createWorklog(ticketConfig, clientConfig, ticketId, data, globalScriptParams) {
15
- const scripts = clientConfig[ticketConfig.requestTypeWorkLog].scripts.POST;
15
+ const scripts = clientConfig[ticketConfig.requestTypeWorkLog].scripts;
16
16
  const mapping = config.getMapping(ticketConfig.requestTypeWorkLog);
17
17
  const fields = clientConfig[ticketConfig.requestTypeWorkLog].fields;
18
18
 
@@ -53,7 +53,7 @@ async function createWorklog(ticketConfig, clientConfig, ticketId, data, globalS
53
53
  const viewAccessConstant = clientConstants.find(element => element.name === "View Access")
54
54
  //run only if isPublic is set and no Constant is defined
55
55
  if (data.isPublic && !viewAccessConstant) {
56
- if (data.isPublic === true) {
56
+ if (data.isPublic === true || data.isPublic === "true") {
57
57
  clientConstants.push({"name": "View Access", "value" : "Public"});
58
58
  } else {
59
59
  clientConstants.push({"name": "View Access", "value" : "Internal"});
package/docs/releases.md CHANGED
@@ -2,6 +2,12 @@
2
2
 
3
3
  ## API
4
4
 
5
+ ### 1.44.0 - 27.09.21
6
+ Also allow CI RecondId for Ticket2CI Relations.
7
+
8
+ ### 1.43.1 - 23.09.21
9
+ Allow also "isPublic": "true" instead of "isPublic": true for Ticket Worklogs
10
+
5
11
  ### 1.43.0 - 20.09.21
6
12
  Allow bypassCache option in Remedy Adapter
7
13
  Add support for Task Phasing
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@manyos/smileconnect-api",
3
- "version": "1.43.0",
3
+ "version": "1.44.0",
4
4
  "description": "A proxy and abstraction layer for BMCs IT Service Management Suite",
5
5
  "main": "app.js",
6
6
  "scripts": {