@manyos/smileconnect-api 1.55.4 → 1.56.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 +313 -309
- package/controller/eventLogController.js +4 -0
- package/controller/scriptController.js +27 -1
- package/controller/ticketController.js +1 -1
- package/docs/releases.md +13 -3
- package/docs/scripts.md +2 -0
- package/package.json +1 -1
- package/routes/scriptRoutes.js +38 -0
- package/util/schemas/scriptRenameSchema.js +14 -0
- package/conf/scripts/INC_CreateWorklog_OnCreate.js +0 -10
- package/conf/scripts/attachi.js +0 -2
- package/conf/scripts/checkGlobalParams.js +0 -3
- package/conf/scripts/count.js +0 -2
- package/conf/scripts/folder1/p1.js +0 -11
- package/conf/scripts/p2.js +0 -15
- package/conf/scripts/p3.js +0 -1
- package/conf/scripts/p4.js +0 -27
- package/conf/scripts/reject.js +0 -1
- package/conf/scripts/script1.js +0 -1
- package/conf/scripts/script2.js +0 -2
- package/conf/scripts/script3.js +0 -2
- package/conf/scripts/scriptPutPost.js +0 -2
- package/conf/scripts/scriptPutPre.js +0 -2
- package/conf/scripts/slash.js +0 -2
- package/conf/scripts/update.js +0 -12
package/conf/clients.json
CHANGED
|
@@ -132,86 +132,13 @@
|
|
|
132
132
|
}
|
|
133
133
|
},
|
|
134
134
|
{
|
|
135
|
-
"name": "
|
|
135
|
+
"name": "smileconnectGui",
|
|
136
136
|
"config": {
|
|
137
137
|
"options": {
|
|
138
|
-
"dateFormati": "dd.MM.yyyy HH:mm.ss"
|
|
139
|
-
"clientLimit": 100000,
|
|
140
|
-
"impersonateUser": "rhannemann",
|
|
141
|
-
"allowDynamicImpersonate": true,
|
|
142
|
-
"translateSelectionFieldsX": false
|
|
143
|
-
},
|
|
144
|
-
"custom_Sample:Enrollments": {
|
|
145
|
-
"basequery": "1=1",
|
|
146
|
-
"fields": [
|
|
147
|
-
"Enrollment ID",
|
|
148
|
-
"Enrollee Login",
|
|
149
|
-
"Class ID",
|
|
150
|
-
"Class Title",
|
|
151
|
-
"Class Location",
|
|
152
|
-
"Class Cost",
|
|
153
|
-
"Department",
|
|
154
|
-
"Class Start Date & Time"
|
|
155
|
-
]
|
|
156
|
-
},
|
|
157
|
-
"custom_CTM:People": {
|
|
158
|
-
"basequery": "1=1",
|
|
159
|
-
"fields": [
|
|
160
|
-
"Remedy Login ID",
|
|
161
|
-
"Full Name"
|
|
162
|
-
],
|
|
163
|
-
"scripts": {
|
|
164
|
-
"GET": {
|
|
165
|
-
"preMapping": [],
|
|
166
|
-
"postMapping": []
|
|
167
|
-
},
|
|
168
|
-
"PUT": {
|
|
169
|
-
"preMapping": [
|
|
170
|
-
"slash"
|
|
171
|
-
],
|
|
172
|
-
"postMapping": [],
|
|
173
|
-
"afterExecution": []
|
|
174
|
-
},
|
|
175
|
-
"POST": {
|
|
176
|
-
"preMapping": [],
|
|
177
|
-
"postMapping": [],
|
|
178
|
-
"afterExecution": []
|
|
179
|
-
}
|
|
180
|
-
}
|
|
181
|
-
},
|
|
182
|
-
"custom_TMS:Task": {
|
|
183
|
-
"basequery": "1=1",
|
|
184
|
-
"fields": [
|
|
185
|
-
"Task ID",
|
|
186
|
-
"Summary",
|
|
187
|
-
"z1D_WorkInfoNotes",
|
|
188
|
-
"Notes",
|
|
189
|
-
"Assignee Group",
|
|
190
|
-
"Assignee Group ID",
|
|
191
|
-
"Assignee Organization",
|
|
192
|
-
"Support Company",
|
|
193
|
-
"Status"
|
|
194
|
-
],
|
|
195
|
-
"constants": [],
|
|
196
|
-
"scripts": {
|
|
197
|
-
"GET": {
|
|
198
|
-
"preMapping": [],
|
|
199
|
-
"postMapping": []
|
|
200
|
-
},
|
|
201
|
-
"PUT": {
|
|
202
|
-
"preMapping": [],
|
|
203
|
-
"postMapping": [],
|
|
204
|
-
"afterExecution": []
|
|
205
|
-
},
|
|
206
|
-
"POST": {
|
|
207
|
-
"preMapping": [],
|
|
208
|
-
"postMapping": [],
|
|
209
|
-
"afterExecution": []
|
|
210
|
-
}
|
|
211
|
-
}
|
|
138
|
+
"dateFormati": "dd.MM.yyyy HH:mm.ss"
|
|
212
139
|
},
|
|
213
140
|
"cmdbobject": {
|
|
214
|
-
"basequery": "('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
141
|
+
"basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
215
142
|
"fields": [
|
|
216
143
|
"Instance Id",
|
|
217
144
|
"Tag Number",
|
|
@@ -222,44 +149,15 @@
|
|
|
222
149
|
"Type",
|
|
223
150
|
"Availability",
|
|
224
151
|
"Confidentiality",
|
|
225
|
-
"
|
|
152
|
+
"Integrity",
|
|
226
153
|
"Authenticity",
|
|
227
154
|
"Model Number",
|
|
155
|
+
"Class Id",
|
|
228
156
|
"Reconciliation Identity",
|
|
229
|
-
"Short Description"
|
|
230
|
-
"Data Set Id"
|
|
231
|
-
],
|
|
232
|
-
"fields_AST:ComputerSystem": [
|
|
233
|
-
"DNS Host Name"
|
|
234
|
-
],
|
|
235
|
-
"fields_AST:LANEndpoint": [
|
|
236
|
-
"MACAddress"
|
|
237
|
-
],
|
|
238
|
-
"constants": [
|
|
239
|
-
{
|
|
240
|
-
"name": "Location Company",
|
|
241
|
-
"value": "Calbro Services and Weapons"
|
|
242
|
-
}
|
|
157
|
+
"Short Description"
|
|
243
158
|
],
|
|
244
|
-
"
|
|
245
|
-
|
|
246
|
-
"preMapping": [
|
|
247
|
-
"script1",
|
|
248
|
-
"script2"
|
|
249
|
-
],
|
|
250
|
-
"postMapping": [
|
|
251
|
-
"script1"
|
|
252
|
-
]
|
|
253
|
-
},
|
|
254
|
-
"POST": {
|
|
255
|
-
"preMapping": [
|
|
256
|
-
"scriptPutPre"
|
|
257
|
-
],
|
|
258
|
-
"postMapping": [
|
|
259
|
-
"scriptPutPost"
|
|
260
|
-
]
|
|
261
|
-
}
|
|
262
|
-
}
|
|
159
|
+
"constants": [],
|
|
160
|
+
"scripts": {}
|
|
263
161
|
},
|
|
264
162
|
"change": {
|
|
265
163
|
"fields": [
|
|
@@ -283,8 +181,7 @@
|
|
|
283
181
|
"Support Group ID 2",
|
|
284
182
|
"Customer Person ID",
|
|
285
183
|
"Requested By Person ID",
|
|
286
|
-
"Change Target Date"
|
|
287
|
-
"ServiceCI_ReconID"
|
|
184
|
+
"Change Target Date"
|
|
288
185
|
],
|
|
289
186
|
"constants": [
|
|
290
187
|
{
|
|
@@ -301,11 +198,7 @@
|
|
|
301
198
|
}
|
|
302
199
|
],
|
|
303
200
|
"basequery": "",
|
|
304
|
-
"scripts": {
|
|
305
|
-
"POST": {
|
|
306
|
-
"postMapping": []
|
|
307
|
-
}
|
|
308
|
-
}
|
|
201
|
+
"scripts": {}
|
|
309
202
|
},
|
|
310
203
|
"person": {
|
|
311
204
|
"basequery": "1=1",
|
|
@@ -331,17 +224,6 @@
|
|
|
331
224
|
"constants": [],
|
|
332
225
|
"scripts": {}
|
|
333
226
|
},
|
|
334
|
-
"organisation": {
|
|
335
|
-
"basequery": "1=1",
|
|
336
|
-
"fields": [
|
|
337
|
-
"People Organization ID",
|
|
338
|
-
"Company",
|
|
339
|
-
"Organization",
|
|
340
|
-
"Department"
|
|
341
|
-
],
|
|
342
|
-
"constants": [],
|
|
343
|
-
"scripts": {}
|
|
344
|
-
},
|
|
345
227
|
"changeWorklog": {
|
|
346
228
|
"fields": [
|
|
347
229
|
"Description",
|
|
@@ -360,31 +242,22 @@
|
|
|
360
242
|
{
|
|
361
243
|
"name": "Communication Source",
|
|
362
244
|
"value": "Other"
|
|
245
|
+
},
|
|
246
|
+
{
|
|
247
|
+
"name": "View Access",
|
|
248
|
+
"value": "Internal"
|
|
363
249
|
}
|
|
364
250
|
],
|
|
365
|
-
"basequery": "
|
|
366
|
-
"scripts": {
|
|
367
|
-
|
|
368
|
-
"preMapping": [
|
|
369
|
-
"attachi"
|
|
370
|
-
]
|
|
371
|
-
}
|
|
372
|
-
},
|
|
373
|
-
"attachmentScripts": {
|
|
374
|
-
"POST": {
|
|
375
|
-
"preMapping": [
|
|
376
|
-
"attachi"
|
|
377
|
-
]
|
|
378
|
-
}
|
|
379
|
-
}
|
|
251
|
+
"basequery": "",
|
|
252
|
+
"scripts": {},
|
|
253
|
+
"attachmentScripts": {}
|
|
380
254
|
},
|
|
381
255
|
"workOrder": {
|
|
382
256
|
"fields": [
|
|
383
257
|
"Work Order ID",
|
|
384
258
|
"Status",
|
|
385
259
|
"InstanceId",
|
|
386
|
-
"WO Type Field
|
|
387
|
-
"WO Type Field 10",
|
|
260
|
+
"WO Type Field 2",
|
|
388
261
|
"Categorization Tier 1",
|
|
389
262
|
"Categorization Tier 2",
|
|
390
263
|
"Categorization Tier 3",
|
|
@@ -434,7 +307,7 @@
|
|
|
434
307
|
"Manufacturer",
|
|
435
308
|
"Detailed Decription",
|
|
436
309
|
"Description",
|
|
437
|
-
"
|
|
310
|
+
"Status Reason",
|
|
438
311
|
"Impact",
|
|
439
312
|
"Urgency",
|
|
440
313
|
"Priority",
|
|
@@ -444,9 +317,7 @@
|
|
|
444
317
|
"Person ID",
|
|
445
318
|
"Direct Contact Person ID",
|
|
446
319
|
"Submit Date",
|
|
447
|
-
"Last Modified Date"
|
|
448
|
-
"Resolution",
|
|
449
|
-
"Submitter"
|
|
320
|
+
"Last Modified Date"
|
|
450
321
|
],
|
|
451
322
|
"constants": [
|
|
452
323
|
{
|
|
@@ -472,32 +343,10 @@
|
|
|
472
343
|
{
|
|
473
344
|
"name": "Status",
|
|
474
345
|
"value": "0"
|
|
475
|
-
},
|
|
476
|
-
{
|
|
477
|
-
"name": "Submitter",
|
|
478
|
-
"value": "Horstinaut"
|
|
479
346
|
}
|
|
480
347
|
],
|
|
481
|
-
"basequery": "
|
|
482
|
-
"scripts": {
|
|
483
|
-
"GET": {
|
|
484
|
-
"preMapping": [],
|
|
485
|
-
"postMapping": [],
|
|
486
|
-
"afterExecution": []
|
|
487
|
-
},
|
|
488
|
-
"POST": {
|
|
489
|
-
"preMapping": [],
|
|
490
|
-
"postMapping": [],
|
|
491
|
-
"afterExecution": [
|
|
492
|
-
"INC_CreateWorklog_OnCreate"
|
|
493
|
-
]
|
|
494
|
-
},
|
|
495
|
-
"PUT": {
|
|
496
|
-
"preMapping": [],
|
|
497
|
-
"postMapping": [],
|
|
498
|
-
"afterExecution": []
|
|
499
|
-
}
|
|
500
|
-
}
|
|
348
|
+
"basequery": "",
|
|
349
|
+
"scripts": {}
|
|
501
350
|
},
|
|
502
351
|
"problem": {
|
|
503
352
|
"fields": [
|
|
@@ -522,8 +371,7 @@
|
|
|
522
371
|
"Owner Group ID",
|
|
523
372
|
"Vendor Group ID",
|
|
524
373
|
"Person ID",
|
|
525
|
-
"Direct Contact Person ID"
|
|
526
|
-
"Target Resolution Date"
|
|
374
|
+
"Direct Contact Person ID"
|
|
527
375
|
],
|
|
528
376
|
"constants": [
|
|
529
377
|
{
|
|
@@ -561,8 +409,7 @@
|
|
|
561
409
|
"workOrderWorklog": {
|
|
562
410
|
"fields": [
|
|
563
411
|
"Description",
|
|
564
|
-
"Detailed Description"
|
|
565
|
-
"View Access"
|
|
412
|
+
"Detailed Description"
|
|
566
413
|
],
|
|
567
414
|
"constants": [
|
|
568
415
|
{
|
|
@@ -655,9 +502,7 @@
|
|
|
655
502
|
"Character 01",
|
|
656
503
|
"Support Company",
|
|
657
504
|
"Assignee Organization",
|
|
658
|
-
"Assignee Group"
|
|
659
|
-
"Phase GUID",
|
|
660
|
-
"InstanceId"
|
|
505
|
+
"Assignee Group"
|
|
661
506
|
],
|
|
662
507
|
"constants": [
|
|
663
508
|
{
|
|
@@ -678,8 +523,7 @@
|
|
|
678
523
|
"taskWorklog": {
|
|
679
524
|
"fields": [
|
|
680
525
|
"Summary",
|
|
681
|
-
"Notes"
|
|
682
|
-
"View Access"
|
|
526
|
+
"Notes"
|
|
683
527
|
],
|
|
684
528
|
"constants": [
|
|
685
529
|
{
|
|
@@ -693,17 +537,15 @@
|
|
|
693
537
|
{
|
|
694
538
|
"name": "Communication Source",
|
|
695
539
|
"value": "Other"
|
|
540
|
+
},
|
|
541
|
+
{
|
|
542
|
+
"name": "View Access",
|
|
543
|
+
"value": "Internal"
|
|
696
544
|
}
|
|
697
545
|
],
|
|
698
|
-
"basequery": "
|
|
546
|
+
"basequery": "",
|
|
699
547
|
"scripts": {},
|
|
700
|
-
"attachmentScripts": {
|
|
701
|
-
"POST": {
|
|
702
|
-
"preMapping": [
|
|
703
|
-
"attachi"
|
|
704
|
-
]
|
|
705
|
-
}
|
|
706
|
-
}
|
|
548
|
+
"attachmentScripts": {}
|
|
707
549
|
},
|
|
708
550
|
"flowBuilder": {
|
|
709
551
|
"constants": [
|
|
@@ -716,68 +558,46 @@
|
|
|
716
558
|
"fields": [],
|
|
717
559
|
"scripts": {}
|
|
718
560
|
},
|
|
561
|
+
"organisation": {
|
|
562
|
+
"basequery": "1=2",
|
|
563
|
+
"fields": [],
|
|
564
|
+
"constants": [],
|
|
565
|
+
"scripts": {}
|
|
566
|
+
},
|
|
719
567
|
"changeTemplate": {
|
|
720
|
-
"basequery": "1=
|
|
721
|
-
"fields": [
|
|
722
|
-
"Template Name",
|
|
723
|
-
"Description",
|
|
724
|
-
"Detailed Description",
|
|
725
|
-
"InstanceId"
|
|
726
|
-
],
|
|
568
|
+
"basequery": "1=2",
|
|
569
|
+
"fields": [],
|
|
727
570
|
"constants": [],
|
|
728
571
|
"scripts": {}
|
|
729
572
|
},
|
|
730
573
|
"incidentTemplate": {
|
|
731
|
-
"basequery": "1=
|
|
732
|
-
"fields": [
|
|
733
|
-
"InstanceId",
|
|
734
|
-
"Template Name",
|
|
735
|
-
"Description",
|
|
736
|
-
"Detailed Decription"
|
|
737
|
-
],
|
|
574
|
+
"basequery": "1=2",
|
|
575
|
+
"fields": [],
|
|
738
576
|
"constants": [],
|
|
739
577
|
"scripts": {}
|
|
740
578
|
},
|
|
741
579
|
"problemTemplate": {
|
|
742
|
-
"basequery": "1=
|
|
743
|
-
"fields": [
|
|
744
|
-
"InstanceId",
|
|
745
|
-
"Template Name",
|
|
746
|
-
"Description",
|
|
747
|
-
"Detailed Decription"
|
|
748
|
-
],
|
|
580
|
+
"basequery": "1=2",
|
|
581
|
+
"fields": [],
|
|
749
582
|
"constants": [],
|
|
750
583
|
"scripts": {}
|
|
751
584
|
},
|
|
752
585
|
"workOrderTemplate": {
|
|
753
|
-
"basequery": "1=
|
|
754
|
-
"fields": [
|
|
755
|
-
"GUID",
|
|
756
|
-
"Summary",
|
|
757
|
-
"Notes",
|
|
758
|
-
"Template Name"
|
|
759
|
-
],
|
|
586
|
+
"basequery": "1=2",
|
|
587
|
+
"fields": [],
|
|
760
588
|
"constants": [],
|
|
761
589
|
"scripts": {}
|
|
762
590
|
},
|
|
763
591
|
"taskTemplate": {
|
|
764
|
-
"basequery": "1=
|
|
765
|
-
"fields": [
|
|
766
|
-
"InstanceId",
|
|
767
|
-
"TaskName",
|
|
768
|
-
"Summary",
|
|
769
|
-
"Notes",
|
|
770
|
-
"Company",
|
|
771
|
-
"Assignee Organization",
|
|
772
|
-
"Assignee Group"
|
|
773
|
-
],
|
|
592
|
+
"basequery": "1=2",
|
|
593
|
+
"fields": [],
|
|
774
594
|
"constants": [],
|
|
775
595
|
"scripts": {}
|
|
776
596
|
}
|
|
777
597
|
}
|
|
778
598
|
},
|
|
779
599
|
{
|
|
780
|
-
"name": "
|
|
600
|
+
"name": "ismsNeu",
|
|
781
601
|
"config": {
|
|
782
602
|
"options": {
|
|
783
603
|
"dateFormati": "dd.MM.yyyy HH:mm.ss"
|
|
@@ -805,6 +625,7 @@
|
|
|
805
625
|
"scripts": {}
|
|
806
626
|
},
|
|
807
627
|
"change": {
|
|
628
|
+
"basequery": "",
|
|
808
629
|
"fields": [
|
|
809
630
|
"Infrastructure Change ID",
|
|
810
631
|
"Categorization Tier 1",
|
|
@@ -842,7 +663,6 @@
|
|
|
842
663
|
"value": "Allen"
|
|
843
664
|
}
|
|
844
665
|
],
|
|
845
|
-
"basequery": "",
|
|
846
666
|
"scripts": {}
|
|
847
667
|
},
|
|
848
668
|
"person": {
|
|
@@ -857,18 +677,6 @@
|
|
|
857
677
|
"constants": [],
|
|
858
678
|
"scripts": {}
|
|
859
679
|
},
|
|
860
|
-
"supportGroup": {
|
|
861
|
-
"basequery": "1=1",
|
|
862
|
-
"fields": [
|
|
863
|
-
"Support Group ID",
|
|
864
|
-
"Company",
|
|
865
|
-
"Support Organization",
|
|
866
|
-
"Support Group Name",
|
|
867
|
-
"Support Group Role"
|
|
868
|
-
],
|
|
869
|
-
"constants": [],
|
|
870
|
-
"scripts": {}
|
|
871
|
-
},
|
|
872
680
|
"changeWorklog": {
|
|
873
681
|
"fields": [
|
|
874
682
|
"Description",
|
|
@@ -898,6 +706,7 @@
|
|
|
898
706
|
"attachmentScripts": {}
|
|
899
707
|
},
|
|
900
708
|
"workOrder": {
|
|
709
|
+
"basequery": "",
|
|
901
710
|
"fields": [
|
|
902
711
|
"Work Order ID",
|
|
903
712
|
"Status",
|
|
@@ -934,10 +743,10 @@
|
|
|
934
743
|
"value": "Allen"
|
|
935
744
|
}
|
|
936
745
|
],
|
|
937
|
-
"basequery": "",
|
|
938
746
|
"scripts": {}
|
|
939
747
|
},
|
|
940
748
|
"incident": {
|
|
749
|
+
"basequery": "",
|
|
941
750
|
"fields": [
|
|
942
751
|
"Incident Number",
|
|
943
752
|
"Status",
|
|
@@ -990,12 +799,13 @@
|
|
|
990
799
|
"value": "0"
|
|
991
800
|
}
|
|
992
801
|
],
|
|
993
|
-
"basequery": "",
|
|
994
802
|
"scripts": {}
|
|
995
803
|
},
|
|
996
804
|
"problem": {
|
|
805
|
+
"basequery": "",
|
|
997
806
|
"fields": [
|
|
998
807
|
"Problem Investigation ID",
|
|
808
|
+
"Target Resolution Date",
|
|
999
809
|
"Investigation Status",
|
|
1000
810
|
"WO Type Field 2",
|
|
1001
811
|
"Categorization Tier 1",
|
|
@@ -1008,7 +818,7 @@
|
|
|
1008
818
|
"Manufacturer",
|
|
1009
819
|
"Detailed Decription",
|
|
1010
820
|
"Description",
|
|
1011
|
-
"Status Reason",
|
|
821
|
+
"Invesitgation Status Reason",
|
|
1012
822
|
"Impact",
|
|
1013
823
|
"Urgency",
|
|
1014
824
|
"Priority",
|
|
@@ -1048,7 +858,6 @@
|
|
|
1048
858
|
"value": "PROBLEM"
|
|
1049
859
|
}
|
|
1050
860
|
],
|
|
1051
|
-
"basequery": "",
|
|
1052
861
|
"scripts": {}
|
|
1053
862
|
},
|
|
1054
863
|
"workOrderWorklog": {
|
|
@@ -1203,6 +1012,12 @@
|
|
|
1203
1012
|
"fields": [],
|
|
1204
1013
|
"scripts": {}
|
|
1205
1014
|
},
|
|
1015
|
+
"supportGroup": {
|
|
1016
|
+
"basequery": "1=2",
|
|
1017
|
+
"fields": [],
|
|
1018
|
+
"constants": [],
|
|
1019
|
+
"scripts": {}
|
|
1020
|
+
},
|
|
1206
1021
|
"organisation": {
|
|
1207
1022
|
"basequery": "1=2",
|
|
1208
1023
|
"fields": [],
|
|
@@ -1242,10 +1057,10 @@
|
|
|
1242
1057
|
}
|
|
1243
1058
|
},
|
|
1244
1059
|
{
|
|
1245
|
-
"name": "
|
|
1060
|
+
"name": "ismsNeu2",
|
|
1246
1061
|
"config": {
|
|
1247
1062
|
"options": {
|
|
1248
|
-
"
|
|
1063
|
+
"dateFormat": "dd.MM.yyyy HH:mm.ss"
|
|
1249
1064
|
},
|
|
1250
1065
|
"cmdbobject": {
|
|
1251
1066
|
"basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
@@ -1450,7 +1265,6 @@
|
|
|
1450
1265
|
"basequery": "",
|
|
1451
1266
|
"fields": [
|
|
1452
1267
|
"Problem Investigation ID",
|
|
1453
|
-
"Target Resolution Date",
|
|
1454
1268
|
"Investigation Status",
|
|
1455
1269
|
"WO Type Field 2",
|
|
1456
1270
|
"Categorization Tier 1",
|
|
@@ -1463,7 +1277,7 @@
|
|
|
1463
1277
|
"Manufacturer",
|
|
1464
1278
|
"Detailed Decription",
|
|
1465
1279
|
"Description",
|
|
1466
|
-
"
|
|
1280
|
+
"Status Reason",
|
|
1467
1281
|
"Impact",
|
|
1468
1282
|
"Urgency",
|
|
1469
1283
|
"Priority",
|
|
@@ -1702,10 +1516,10 @@
|
|
|
1702
1516
|
}
|
|
1703
1517
|
},
|
|
1704
1518
|
{
|
|
1705
|
-
"name": "
|
|
1519
|
+
"name": "robert2",
|
|
1706
1520
|
"config": {
|
|
1707
1521
|
"options": {
|
|
1708
|
-
"
|
|
1522
|
+
"dateFormati": "dd.MM.yyyy HH:mm.ss"
|
|
1709
1523
|
},
|
|
1710
1524
|
"cmdbobject": {
|
|
1711
1525
|
"basequery": "'Data Set Id' = \"BMC.ASSET\" AND ('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
@@ -2161,13 +1975,86 @@
|
|
|
2161
1975
|
}
|
|
2162
1976
|
},
|
|
2163
1977
|
{
|
|
2164
|
-
"name": "
|
|
1978
|
+
"name": "isms",
|
|
2165
1979
|
"config": {
|
|
2166
1980
|
"options": {
|
|
2167
|
-
"dateFormati": "dd.MM.yyyy HH:mm.ss"
|
|
1981
|
+
"dateFormati": "dd.MM.yyyy HH:mm.ss",
|
|
1982
|
+
"clientLimit": 100000,
|
|
1983
|
+
"impersonateUser": "rhannemann",
|
|
1984
|
+
"allowDynamicImpersonate": true,
|
|
1985
|
+
"translateSelectionFieldsX": false
|
|
1986
|
+
},
|
|
1987
|
+
"custom_Sample:Enrollments": {
|
|
1988
|
+
"basequery": "1=1",
|
|
1989
|
+
"fields": [
|
|
1990
|
+
"Enrollment ID",
|
|
1991
|
+
"Enrollee Login",
|
|
1992
|
+
"Class ID",
|
|
1993
|
+
"Class Title",
|
|
1994
|
+
"Class Location",
|
|
1995
|
+
"Class Cost",
|
|
1996
|
+
"Department",
|
|
1997
|
+
"Class Start Date & Time"
|
|
1998
|
+
]
|
|
1999
|
+
},
|
|
2000
|
+
"custom_CTM:People": {
|
|
2001
|
+
"basequery": "1=1",
|
|
2002
|
+
"fields": [
|
|
2003
|
+
"Remedy Login ID",
|
|
2004
|
+
"Full Name"
|
|
2005
|
+
],
|
|
2006
|
+
"scripts": {
|
|
2007
|
+
"GET": {
|
|
2008
|
+
"preMapping": [],
|
|
2009
|
+
"postMapping": []
|
|
2010
|
+
},
|
|
2011
|
+
"PUT": {
|
|
2012
|
+
"preMapping": [
|
|
2013
|
+
"slash"
|
|
2014
|
+
],
|
|
2015
|
+
"postMapping": [],
|
|
2016
|
+
"afterExecution": []
|
|
2017
|
+
},
|
|
2018
|
+
"POST": {
|
|
2019
|
+
"preMapping": [],
|
|
2020
|
+
"postMapping": [],
|
|
2021
|
+
"afterExecution": []
|
|
2022
|
+
}
|
|
2023
|
+
}
|
|
2024
|
+
},
|
|
2025
|
+
"custom_TMS:Task": {
|
|
2026
|
+
"basequery": "1=1",
|
|
2027
|
+
"fields": [
|
|
2028
|
+
"Task ID",
|
|
2029
|
+
"Summary",
|
|
2030
|
+
"z1D_WorkInfoNotes",
|
|
2031
|
+
"Notes",
|
|
2032
|
+
"Assignee Group",
|
|
2033
|
+
"Assignee Group ID",
|
|
2034
|
+
"Assignee Organization",
|
|
2035
|
+
"Support Company",
|
|
2036
|
+
"Status"
|
|
2037
|
+
],
|
|
2038
|
+
"constants": [],
|
|
2039
|
+
"scripts": {
|
|
2040
|
+
"GET": {
|
|
2041
|
+
"preMapping": [],
|
|
2042
|
+
"postMapping": []
|
|
2043
|
+
},
|
|
2044
|
+
"PUT": {
|
|
2045
|
+
"preMapping": [],
|
|
2046
|
+
"postMapping": [],
|
|
2047
|
+
"afterExecution": []
|
|
2048
|
+
},
|
|
2049
|
+
"POST": {
|
|
2050
|
+
"preMapping": [],
|
|
2051
|
+
"postMapping": [],
|
|
2052
|
+
"afterExecution": []
|
|
2053
|
+
}
|
|
2054
|
+
}
|
|
2168
2055
|
},
|
|
2169
2056
|
"cmdbobject": {
|
|
2170
|
-
"basequery": "
|
|
2057
|
+
"basequery": "('Mark As Deleted' = \"No\" OR 'Mark As Deleted' = $NULL$)",
|
|
2171
2058
|
"fields": [
|
|
2172
2059
|
"Instance Id",
|
|
2173
2060
|
"Tag Number",
|
|
@@ -2178,18 +2065,46 @@
|
|
|
2178
2065
|
"Type",
|
|
2179
2066
|
"Availability",
|
|
2180
2067
|
"Confidentiality",
|
|
2181
|
-
"
|
|
2068
|
+
"Class Id",
|
|
2182
2069
|
"Authenticity",
|
|
2183
2070
|
"Model Number",
|
|
2184
|
-
"Class Id",
|
|
2185
2071
|
"Reconciliation Identity",
|
|
2186
|
-
"Short Description"
|
|
2072
|
+
"Short Description",
|
|
2073
|
+
"Data Set Id"
|
|
2187
2074
|
],
|
|
2188
|
-
"
|
|
2189
|
-
|
|
2075
|
+
"fields_AST:ComputerSystem": [
|
|
2076
|
+
"DNS Host Name"
|
|
2077
|
+
],
|
|
2078
|
+
"fields_AST:LANEndpoint": [
|
|
2079
|
+
"MACAddress"
|
|
2080
|
+
],
|
|
2081
|
+
"constants": [
|
|
2082
|
+
{
|
|
2083
|
+
"name": "Location Company",
|
|
2084
|
+
"value": "Calbro Services and Weapons"
|
|
2085
|
+
}
|
|
2086
|
+
],
|
|
2087
|
+
"scripts": {
|
|
2088
|
+
"GET": {
|
|
2089
|
+
"preMapping": [
|
|
2090
|
+
"script1",
|
|
2091
|
+
"script2"
|
|
2092
|
+
],
|
|
2093
|
+
"postMapping": [
|
|
2094
|
+
"script1"
|
|
2095
|
+
]
|
|
2096
|
+
},
|
|
2097
|
+
"POST": {
|
|
2098
|
+
"preMapping": [
|
|
2099
|
+
"scriptPutPre"
|
|
2100
|
+
],
|
|
2101
|
+
"postMapping": [
|
|
2102
|
+
"scriptPutPost"
|
|
2103
|
+
]
|
|
2104
|
+
}
|
|
2105
|
+
}
|
|
2190
2106
|
},
|
|
2191
2107
|
"change": {
|
|
2192
|
-
"basequery": "",
|
|
2193
2108
|
"fields": [
|
|
2194
2109
|
"Infrastructure Change ID",
|
|
2195
2110
|
"Categorization Tier 1",
|
|
@@ -2211,7 +2126,8 @@
|
|
|
2211
2126
|
"Support Group ID 2",
|
|
2212
2127
|
"Customer Person ID",
|
|
2213
2128
|
"Requested By Person ID",
|
|
2214
|
-
"Change Target Date"
|
|
2129
|
+
"Change Target Date",
|
|
2130
|
+
"ServiceCI_ReconID"
|
|
2215
2131
|
],
|
|
2216
2132
|
"constants": [
|
|
2217
2133
|
{
|
|
@@ -2227,7 +2143,12 @@
|
|
|
2227
2143
|
"value": "Allen"
|
|
2228
2144
|
}
|
|
2229
2145
|
],
|
|
2230
|
-
"
|
|
2146
|
+
"basequery": "",
|
|
2147
|
+
"scripts": {
|
|
2148
|
+
"POST": {
|
|
2149
|
+
"postMapping": []
|
|
2150
|
+
}
|
|
2151
|
+
}
|
|
2231
2152
|
},
|
|
2232
2153
|
"person": {
|
|
2233
2154
|
"basequery": "1=1",
|
|
@@ -2241,6 +2162,29 @@
|
|
|
2241
2162
|
"constants": [],
|
|
2242
2163
|
"scripts": {}
|
|
2243
2164
|
},
|
|
2165
|
+
"supportGroup": {
|
|
2166
|
+
"basequery": "1=1",
|
|
2167
|
+
"fields": [
|
|
2168
|
+
"Support Group ID",
|
|
2169
|
+
"Company",
|
|
2170
|
+
"Support Organization",
|
|
2171
|
+
"Support Group Name",
|
|
2172
|
+
"Support Group Role"
|
|
2173
|
+
],
|
|
2174
|
+
"constants": [],
|
|
2175
|
+
"scripts": {}
|
|
2176
|
+
},
|
|
2177
|
+
"organisation": {
|
|
2178
|
+
"basequery": "1=1",
|
|
2179
|
+
"fields": [
|
|
2180
|
+
"People Organization ID",
|
|
2181
|
+
"Company",
|
|
2182
|
+
"Organization",
|
|
2183
|
+
"Department"
|
|
2184
|
+
],
|
|
2185
|
+
"constants": [],
|
|
2186
|
+
"scripts": {}
|
|
2187
|
+
},
|
|
2244
2188
|
"changeWorklog": {
|
|
2245
2189
|
"fields": [
|
|
2246
2190
|
"Description",
|
|
@@ -2259,23 +2203,31 @@
|
|
|
2259
2203
|
{
|
|
2260
2204
|
"name": "Communication Source",
|
|
2261
2205
|
"value": "Other"
|
|
2262
|
-
},
|
|
2263
|
-
{
|
|
2264
|
-
"name": "View Access",
|
|
2265
|
-
"value": "Internal"
|
|
2266
2206
|
}
|
|
2267
2207
|
],
|
|
2268
|
-
"basequery": "",
|
|
2269
|
-
"scripts": {
|
|
2270
|
-
|
|
2208
|
+
"basequery": "1=1",
|
|
2209
|
+
"scripts": {
|
|
2210
|
+
"POST": {
|
|
2211
|
+
"preMapping": [
|
|
2212
|
+
"attachi"
|
|
2213
|
+
]
|
|
2214
|
+
}
|
|
2215
|
+
},
|
|
2216
|
+
"attachmentScripts": {
|
|
2217
|
+
"POST": {
|
|
2218
|
+
"preMapping": [
|
|
2219
|
+
"attachi"
|
|
2220
|
+
]
|
|
2221
|
+
}
|
|
2222
|
+
}
|
|
2271
2223
|
},
|
|
2272
2224
|
"workOrder": {
|
|
2273
|
-
"basequery": "",
|
|
2274
2225
|
"fields": [
|
|
2275
2226
|
"Work Order ID",
|
|
2276
2227
|
"Status",
|
|
2277
2228
|
"InstanceId",
|
|
2278
|
-
"WO Type Field
|
|
2229
|
+
"WO Type Field 02",
|
|
2230
|
+
"WO Type Field 10",
|
|
2279
2231
|
"Categorization Tier 1",
|
|
2280
2232
|
"Categorization Tier 2",
|
|
2281
2233
|
"Categorization Tier 3",
|
|
@@ -2307,10 +2259,10 @@
|
|
|
2307
2259
|
"value": "Allen"
|
|
2308
2260
|
}
|
|
2309
2261
|
],
|
|
2262
|
+
"basequery": "",
|
|
2310
2263
|
"scripts": {}
|
|
2311
2264
|
},
|
|
2312
2265
|
"incident": {
|
|
2313
|
-
"basequery": "",
|
|
2314
2266
|
"fields": [
|
|
2315
2267
|
"Incident Number",
|
|
2316
2268
|
"Status",
|
|
@@ -2325,7 +2277,7 @@
|
|
|
2325
2277
|
"Manufacturer",
|
|
2326
2278
|
"Detailed Decription",
|
|
2327
2279
|
"Description",
|
|
2328
|
-
"
|
|
2280
|
+
"Status_Reason",
|
|
2329
2281
|
"Impact",
|
|
2330
2282
|
"Urgency",
|
|
2331
2283
|
"Priority",
|
|
@@ -2335,7 +2287,9 @@
|
|
|
2335
2287
|
"Person ID",
|
|
2336
2288
|
"Direct Contact Person ID",
|
|
2337
2289
|
"Submit Date",
|
|
2338
|
-
"Last Modified Date"
|
|
2290
|
+
"Last Modified Date",
|
|
2291
|
+
"Resolution",
|
|
2292
|
+
"Submitter"
|
|
2339
2293
|
],
|
|
2340
2294
|
"constants": [
|
|
2341
2295
|
{
|
|
@@ -2361,12 +2315,38 @@
|
|
|
2361
2315
|
{
|
|
2362
2316
|
"name": "Status",
|
|
2363
2317
|
"value": "0"
|
|
2318
|
+
},
|
|
2319
|
+
{
|
|
2320
|
+
"name": "Submitter",
|
|
2321
|
+
"value": "Horstinaut"
|
|
2364
2322
|
}
|
|
2365
2323
|
],
|
|
2366
|
-
"
|
|
2324
|
+
"basequery": "1=1",
|
|
2325
|
+
"scripts": {
|
|
2326
|
+
"GET": {
|
|
2327
|
+
"preMapping": [
|
|
2328
|
+
"p2"
|
|
2329
|
+
],
|
|
2330
|
+
"postMapping": [],
|
|
2331
|
+
"afterExecution": []
|
|
2332
|
+
},
|
|
2333
|
+
"POST": {
|
|
2334
|
+
"preMapping": [
|
|
2335
|
+
"p2"
|
|
2336
|
+
],
|
|
2337
|
+
"postMapping": [],
|
|
2338
|
+
"afterExecution": [
|
|
2339
|
+
"INC_CreateWorklog_OnCreate"
|
|
2340
|
+
]
|
|
2341
|
+
},
|
|
2342
|
+
"PUT": {
|
|
2343
|
+
"preMapping": [],
|
|
2344
|
+
"postMapping": [],
|
|
2345
|
+
"afterExecution": []
|
|
2346
|
+
}
|
|
2347
|
+
}
|
|
2367
2348
|
},
|
|
2368
2349
|
"problem": {
|
|
2369
|
-
"basequery": "",
|
|
2370
2350
|
"fields": [
|
|
2371
2351
|
"Problem Investigation ID",
|
|
2372
2352
|
"Investigation Status",
|
|
@@ -2389,7 +2369,8 @@
|
|
|
2389
2369
|
"Owner Group ID",
|
|
2390
2370
|
"Vendor Group ID",
|
|
2391
2371
|
"Person ID",
|
|
2392
|
-
"Direct Contact Person ID"
|
|
2372
|
+
"Direct Contact Person ID",
|
|
2373
|
+
"Target Resolution Date"
|
|
2393
2374
|
],
|
|
2394
2375
|
"constants": [
|
|
2395
2376
|
{
|
|
@@ -2421,12 +2402,14 @@
|
|
|
2421
2402
|
"value": "PROBLEM"
|
|
2422
2403
|
}
|
|
2423
2404
|
],
|
|
2405
|
+
"basequery": "",
|
|
2424
2406
|
"scripts": {}
|
|
2425
2407
|
},
|
|
2426
2408
|
"workOrderWorklog": {
|
|
2427
2409
|
"fields": [
|
|
2428
2410
|
"Description",
|
|
2429
|
-
"Detailed Description"
|
|
2411
|
+
"Detailed Description",
|
|
2412
|
+
"View Access"
|
|
2430
2413
|
],
|
|
2431
2414
|
"constants": [
|
|
2432
2415
|
{
|
|
@@ -2519,7 +2502,9 @@
|
|
|
2519
2502
|
"Character 01",
|
|
2520
2503
|
"Support Company",
|
|
2521
2504
|
"Assignee Organization",
|
|
2522
|
-
"Assignee Group"
|
|
2505
|
+
"Assignee Group",
|
|
2506
|
+
"Phase GUID",
|
|
2507
|
+
"InstanceId"
|
|
2523
2508
|
],
|
|
2524
2509
|
"constants": [
|
|
2525
2510
|
{
|
|
@@ -2540,7 +2525,8 @@
|
|
|
2540
2525
|
"taskWorklog": {
|
|
2541
2526
|
"fields": [
|
|
2542
2527
|
"Summary",
|
|
2543
|
-
"Notes"
|
|
2528
|
+
"Notes",
|
|
2529
|
+
"View Access"
|
|
2544
2530
|
],
|
|
2545
2531
|
"constants": [
|
|
2546
2532
|
{
|
|
@@ -2554,15 +2540,17 @@
|
|
|
2554
2540
|
{
|
|
2555
2541
|
"name": "Communication Source",
|
|
2556
2542
|
"value": "Other"
|
|
2557
|
-
},
|
|
2558
|
-
{
|
|
2559
|
-
"name": "View Access",
|
|
2560
|
-
"value": "Internal"
|
|
2561
2543
|
}
|
|
2562
2544
|
],
|
|
2563
|
-
"basequery": "",
|
|
2545
|
+
"basequery": "1=1",
|
|
2564
2546
|
"scripts": {},
|
|
2565
|
-
"attachmentScripts": {
|
|
2547
|
+
"attachmentScripts": {
|
|
2548
|
+
"POST": {
|
|
2549
|
+
"preMapping": [
|
|
2550
|
+
"attachi"
|
|
2551
|
+
]
|
|
2552
|
+
}
|
|
2553
|
+
}
|
|
2566
2554
|
},
|
|
2567
2555
|
"flowBuilder": {
|
|
2568
2556
|
"constants": [
|
|
@@ -2575,45 +2563,61 @@
|
|
|
2575
2563
|
"fields": [],
|
|
2576
2564
|
"scripts": {}
|
|
2577
2565
|
},
|
|
2578
|
-
"supportGroup": {
|
|
2579
|
-
"basequery": "1=2",
|
|
2580
|
-
"fields": [],
|
|
2581
|
-
"constants": [],
|
|
2582
|
-
"scripts": {}
|
|
2583
|
-
},
|
|
2584
|
-
"organisation": {
|
|
2585
|
-
"basequery": "1=2",
|
|
2586
|
-
"fields": [],
|
|
2587
|
-
"constants": [],
|
|
2588
|
-
"scripts": {}
|
|
2589
|
-
},
|
|
2590
2566
|
"changeTemplate": {
|
|
2591
|
-
"basequery": "1=
|
|
2592
|
-
"fields": [
|
|
2567
|
+
"basequery": "1=1",
|
|
2568
|
+
"fields": [
|
|
2569
|
+
"Template Name",
|
|
2570
|
+
"Description",
|
|
2571
|
+
"Detailed Description",
|
|
2572
|
+
"InstanceId"
|
|
2573
|
+
],
|
|
2593
2574
|
"constants": [],
|
|
2594
2575
|
"scripts": {}
|
|
2595
2576
|
},
|
|
2596
2577
|
"incidentTemplate": {
|
|
2597
|
-
"basequery": "1=
|
|
2598
|
-
"fields": [
|
|
2578
|
+
"basequery": "1=1",
|
|
2579
|
+
"fields": [
|
|
2580
|
+
"InstanceId",
|
|
2581
|
+
"Template Name",
|
|
2582
|
+
"Description",
|
|
2583
|
+
"Detailed Decription"
|
|
2584
|
+
],
|
|
2599
2585
|
"constants": [],
|
|
2600
2586
|
"scripts": {}
|
|
2601
2587
|
},
|
|
2602
2588
|
"problemTemplate": {
|
|
2603
|
-
"basequery": "1=
|
|
2604
|
-
"fields": [
|
|
2589
|
+
"basequery": "1=1",
|
|
2590
|
+
"fields": [
|
|
2591
|
+
"InstanceId",
|
|
2592
|
+
"Template Name",
|
|
2593
|
+
"Description",
|
|
2594
|
+
"Detailed Decription"
|
|
2595
|
+
],
|
|
2605
2596
|
"constants": [],
|
|
2606
2597
|
"scripts": {}
|
|
2607
2598
|
},
|
|
2608
2599
|
"workOrderTemplate": {
|
|
2609
|
-
"basequery": "1=
|
|
2610
|
-
"fields": [
|
|
2600
|
+
"basequery": "1=1",
|
|
2601
|
+
"fields": [
|
|
2602
|
+
"GUID",
|
|
2603
|
+
"Summary",
|
|
2604
|
+
"Notes",
|
|
2605
|
+
"Template Name"
|
|
2606
|
+
],
|
|
2611
2607
|
"constants": [],
|
|
2612
2608
|
"scripts": {}
|
|
2613
2609
|
},
|
|
2614
2610
|
"taskTemplate": {
|
|
2615
|
-
"basequery": "1=
|
|
2616
|
-
"fields": [
|
|
2611
|
+
"basequery": "1=1",
|
|
2612
|
+
"fields": [
|
|
2613
|
+
"InstanceId",
|
|
2614
|
+
"TaskName",
|
|
2615
|
+
"Summary",
|
|
2616
|
+
"Notes",
|
|
2617
|
+
"Company",
|
|
2618
|
+
"Assignee Organization",
|
|
2619
|
+
"Assignee Group"
|
|
2620
|
+
],
|
|
2617
2621
|
"constants": [],
|
|
2618
2622
|
"scripts": {}
|
|
2619
2623
|
}
|
|
@@ -64,6 +64,10 @@ function setEventData(req, eventBase, eventAction, schemaName, ticketNumber, jso
|
|
|
64
64
|
"ticketNumber3": ticketNumber3,
|
|
65
65
|
"jsonData" : jsonData
|
|
66
66
|
};
|
|
67
|
+
if (!req.globalScriptParams) {
|
|
68
|
+
req.globalScriptParams = {}
|
|
69
|
+
}
|
|
70
|
+
req.globalScriptParams.event = req.eventData.event;
|
|
67
71
|
}
|
|
68
72
|
|
|
69
73
|
function setTicketId(req, ticketNumber) {
|
|
@@ -9,7 +9,7 @@ const basePathGlobalScripts = basePath + '/scripts';
|
|
|
9
9
|
const fetch = require('node-fetch');
|
|
10
10
|
const xmlParser = require('fast-xml-parser')
|
|
11
11
|
|
|
12
|
-
const {getClients} = require('../util/config');
|
|
12
|
+
const {getClients, getClient, setClient} = require('../util/config');
|
|
13
13
|
|
|
14
14
|
require('dotenv').config();
|
|
15
15
|
const {NodeVM} = require('vm2');
|
|
@@ -118,6 +118,31 @@ async function getGlobalScript(scriptId) {
|
|
|
118
118
|
return readScriptFromFile(fileName);
|
|
119
119
|
}
|
|
120
120
|
|
|
121
|
+
async function renameScript(scriptIdOld, scriptIdNew) {
|
|
122
|
+
const script = await getGlobalScript(scriptIdOld)
|
|
123
|
+
const usages = await getUsage(scriptIdOld)
|
|
124
|
+
await deleteGlobalScript(scriptIdOld)
|
|
125
|
+
await setGlobalScript(scriptIdNew, script)
|
|
126
|
+
//rename references
|
|
127
|
+
for (let x=0; x< usages.length; x++) {
|
|
128
|
+
const usage = usages[x]
|
|
129
|
+
const clientConfig = await getClient(usage.client)
|
|
130
|
+
const configItem = clientConfig.config[usage.key]
|
|
131
|
+
const scriptDefOps = configItem.scripts[usage.operation]
|
|
132
|
+
const scriptDef = scriptDefOps[usage.scriptType]
|
|
133
|
+
if (scriptDef) {
|
|
134
|
+
const scriptDefNew = scriptDef.map(item => {
|
|
135
|
+
if (item === scriptIdOld)
|
|
136
|
+
return scriptIdNew
|
|
137
|
+
else return item
|
|
138
|
+
})
|
|
139
|
+
scriptDefOps[usage.scriptType] = scriptDefNew
|
|
140
|
+
}
|
|
141
|
+
setClient(usage.client, clientConfig)
|
|
142
|
+
}
|
|
143
|
+
return true;
|
|
144
|
+
}
|
|
145
|
+
|
|
121
146
|
async function setGlobalScript(scriptId, code) {
|
|
122
147
|
return setScript(basePathGlobalScripts, scriptId, code);
|
|
123
148
|
}
|
|
@@ -263,6 +288,7 @@ module.exports = {
|
|
|
263
288
|
getGlobalScript,
|
|
264
289
|
getGlobalScripts,
|
|
265
290
|
setGlobalScript,
|
|
291
|
+
renameScript,
|
|
266
292
|
deleteGlobalScript,
|
|
267
293
|
runScripts,
|
|
268
294
|
getUsage
|
|
@@ -24,7 +24,7 @@ async function createTicket(ticketConfig, clientConfig, data, globalScriptParams
|
|
|
24
24
|
const relations = data.relations || {}
|
|
25
25
|
//run preScripts
|
|
26
26
|
if (scripts && scripts.preMapping) {
|
|
27
|
-
await scriptController.runScripts(scripts.preMapping, data, clientConfig.clientId);
|
|
27
|
+
await scriptController.runScripts(scripts.preMapping, data, clientConfig.clientId, globalScriptParams);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
const requestType = ticketConfig.requestType;
|
package/docs/releases.md
CHANGED
|
@@ -2,6 +2,13 @@
|
|
|
2
2
|
|
|
3
3
|
## API
|
|
4
4
|
|
|
5
|
+
### 1.56.0 - 03.03.22
|
|
6
|
+
Support Script Rename with references
|
|
7
|
+
Add event to globalScriptParams
|
|
8
|
+
|
|
9
|
+
### 1.55.5 - 03.03.22
|
|
10
|
+
Allow startup with broken SMILEconnect Adapter SSO Url.
|
|
11
|
+
|
|
5
12
|
### 1.55.4 - 02.03.22
|
|
6
13
|
Fix error when scripts with space in name are deleted
|
|
7
14
|
|
|
@@ -144,6 +151,9 @@ e.g.
|
|
|
144
151
|
|
|
145
152
|
## Event Manager
|
|
146
153
|
|
|
154
|
+
### 1.22.0 - 03.03.22
|
|
155
|
+
Add updateScriptReference
|
|
156
|
+
|
|
147
157
|
### 1.21.0 - 14.02.22
|
|
148
158
|
Add Auto Resolve to Scripts
|
|
149
159
|
|
|
@@ -173,9 +183,9 @@ The eventmanager will check all outbound webhooks for an event. If one fails, th
|
|
|
173
183
|
|
|
174
184
|
## GUI
|
|
175
185
|
|
|
176
|
-
### 1.8.2 -
|
|
177
|
-
Fixed: delete webhooks for client
|
|
178
|
-
Fixed: delete button / menu is hidden
|
|
186
|
+
### 1.8.2 - 2.3.22
|
|
187
|
+
Fixed: delete webhooks for client when client is deleted
|
|
188
|
+
Fixed: delete button / menu is hidden when client or scriptname is too long
|
|
179
189
|
|
|
180
190
|
### 1.8.0 - 3.2.22
|
|
181
191
|
Fixed wrong Script Config for Custom Form Scripts (attribute clients instead of scripts)
|
package/docs/scripts.md
CHANGED
|
@@ -137,6 +137,8 @@ Global script params are set by the application and handed over to the script. T
|
|
|
137
137
|
}
|
|
138
138
|
```
|
|
139
139
|
|
|
140
|
+
globalScriptParams is not available in Event Manager scripts. Ids are part of requestData there.
|
|
141
|
+
|
|
140
142
|
## requestData
|
|
141
143
|
|
|
142
144
|
This parameter holds the complete request data.
|
package/package.json
CHANGED
package/routes/scriptRoutes.js
CHANGED
|
@@ -4,6 +4,7 @@ const scriptController = require('../controller/scriptController');
|
|
|
4
4
|
const eventLog = require('../controller/eventLogController');
|
|
5
5
|
const CONSTANTS = require('../util/constants');
|
|
6
6
|
const scriptDefinitionSchema = require('../util/schemas/scriptDefinitionSchema');
|
|
7
|
+
const scriptRenameSchema = require('../util/schemas/scriptRenameSchema');
|
|
7
8
|
const {isAuthorizedAdmin} = require('../util/auth');
|
|
8
9
|
|
|
9
10
|
const {checkSchema, validationResult} = require('express-validator');
|
|
@@ -38,6 +39,7 @@ module.exports = (function() {
|
|
|
38
39
|
});
|
|
39
40
|
});
|
|
40
41
|
|
|
42
|
+
//
|
|
41
43
|
scriptRoutes.get('/:scriptId*', isAuthorizedAdmin, async function (req, res, next) {
|
|
42
44
|
const scriptId = decodeScriptName(req.path);
|
|
43
45
|
eventLog.setEventData(
|
|
@@ -70,6 +72,42 @@ module.exports = (function() {
|
|
|
70
72
|
}
|
|
71
73
|
}
|
|
72
74
|
|
|
75
|
+
//
|
|
76
|
+
scriptRoutes.post('/rename',
|
|
77
|
+
isAuthorizedAdmin,
|
|
78
|
+
checkSchema(scriptRenameSchema),
|
|
79
|
+
async function (req, res, next) {
|
|
80
|
+
|
|
81
|
+
//validate schema
|
|
82
|
+
const errors = validationResult(req);
|
|
83
|
+
|
|
84
|
+
try {
|
|
85
|
+
throwSchemaError(errors);
|
|
86
|
+
} catch (error) {
|
|
87
|
+
next(error)
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
const scriptIdOld = req.body.scriptNameOld;
|
|
92
|
+
const scriptIdNew = req.body.scriptNameNew;
|
|
93
|
+
eventLog.setEventData(
|
|
94
|
+
req,
|
|
95
|
+
CONSTANTS.EVENT_BASE_SCRIPT,
|
|
96
|
+
CONSTANTS.EVENT_ACTION_MODIFY,
|
|
97
|
+
CONSTANTS.FORM_SCRIPTS,
|
|
98
|
+
scriptIdOld
|
|
99
|
+
);
|
|
100
|
+
try {
|
|
101
|
+
const script = await scriptController.getGlobalScript(scriptIdOld)
|
|
102
|
+
const res = await scriptController.renameScript(scriptIdOld, scriptIdNew)
|
|
103
|
+
const usage = await scriptController.getUsage(scriptIdNew)
|
|
104
|
+
req.result = {id: scriptIdNew, script, usage};
|
|
105
|
+
} catch (error) {
|
|
106
|
+
next(error)
|
|
107
|
+
}
|
|
108
|
+
next();
|
|
109
|
+
});
|
|
110
|
+
|
|
73
111
|
scriptRoutes.put('/:scriptId*',
|
|
74
112
|
isAuthorizedAdmin,
|
|
75
113
|
checkSchema(scriptDefinitionSchema),
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
log.debug('ID of my new Ticket:', globalScriptParams, clientId)
|
|
2
|
-
|
|
3
|
-
const worklogData = {
|
|
4
|
-
summary: 'New SMILEconnect Ticket',
|
|
5
|
-
text: `Dieses Ticket wurde ueber SMILEconnect (${clientId}) angelegt.`
|
|
6
|
-
}
|
|
7
|
-
const result = await adapter.smileconnect.createTicketWorklog('incidents', globalScriptParams.id, {data: worklogData})
|
|
8
|
-
log.debug(result);
|
|
9
|
-
|
|
10
|
-
resolve()
|
package/conf/scripts/attachi.js
DELETED
package/conf/scripts/count.js
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
const allowedCats = [
|
|
2
|
-
"Request",
|
|
3
|
-
"Failure"
|
|
4
|
-
];
|
|
5
|
-
|
|
6
|
-
//Validate opsCat1
|
|
7
|
-
if (requestData.opsCat1 && !allowedCats.find(element => element === requestData.opsCat1)) {
|
|
8
|
-
reject(`opsCat1 ${requestData.opsCat1} not in allowed values ${allowedCats}`);
|
|
9
|
-
}
|
|
10
|
-
requestData.summary = `Da kam an: ${requestData.summary}`
|
|
11
|
-
resolve();
|
package/conf/scripts/p2.js
DELETED
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
const weatherResponse = await fetch('https://api.openweathermap.org/data/2.5/weather?q=Klagenfurt&appid=bab78e38577c73eeb20ca872998a43dd');
|
|
2
|
-
const remedyResult = await adapter.remedy.search("CTM:People", `'Remedy Login ID' = "Allen"`, "Full Name, Remedy Login ID")
|
|
3
|
-
|
|
4
|
-
if (remedyResult) {
|
|
5
|
-
requestData.remedyQueryResult = remedyResult;
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
if (weatherResponse) {
|
|
9
|
-
requestData.weather = await weatherResponse.json()
|
|
10
|
-
}
|
|
11
|
-
log.debug('testMessage')
|
|
12
|
-
|
|
13
|
-
requestData.scResults = await adapter.smileconnect.getTicket('incidents', requestData.id, {clientId:'idm'})
|
|
14
|
-
|
|
15
|
-
resolve();
|
package/conf/scripts/p3.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
resolve();
|
package/conf/scripts/p4.js
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
reject(globalScriptParams)
|
|
2
|
-
|
|
3
|
-
try {
|
|
4
|
-
const settings = {
|
|
5
|
-
"createForm":"HPD:IncidentInterface_Create",
|
|
6
|
-
"entry": {
|
|
7
|
-
"Description": "incident01_new",
|
|
8
|
-
"Detailed_Decription": "new ticket creation 02_08_2021",
|
|
9
|
-
"Impact": "4-Minor/Localized",
|
|
10
|
-
"Urgency": "4-Low",
|
|
11
|
-
"Priority": "Low",
|
|
12
|
-
"Status": "Assigned",
|
|
13
|
-
"Service_Type": 0,
|
|
14
|
-
"Reported Source": 1000,
|
|
15
|
-
"Login_ID": "Allen"
|
|
16
|
-
}
|
|
17
|
-
};
|
|
18
|
-
//Create Request
|
|
19
|
-
const resultCreate = await adapter.remedy.create(settings.createForm, settings.entry);
|
|
20
|
-
} catch (e) {
|
|
21
|
-
log.debug(`>>> in FCT_TEST: ERROR: ` + e)
|
|
22
|
-
//console.log(requestData.token)
|
|
23
|
-
reject (e)
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
resolve();
|
package/conf/scripts/reject.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
reject(requestData);
|
package/conf/scripts/script1.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// requestData.Name = "Horstdidü";
|
package/conf/scripts/script2.js
DELETED
package/conf/scripts/script3.js
DELETED
package/conf/scripts/slash.js
DELETED
package/conf/scripts/update.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
const settings = {
|
|
2
|
-
"form":"Sample:Cities",
|
|
3
|
-
"id": "000000000000115",
|
|
4
|
-
"entry": {
|
|
5
|
-
"Airport Code": "MUC3",
|
|
6
|
-
"City": "Munich"
|
|
7
|
-
}
|
|
8
|
-
};
|
|
9
|
-
//Create Service Request
|
|
10
|
-
const resultUpdate = await adapter.remedy.update(settings.form, settings.id, settings.entry);
|
|
11
|
-
|
|
12
|
-
resolve(resultUpdate);
|