Implemented trigger logic to create correct fulfillment plans

Implemented ui macro for trigger table field fulfillment plan
Implemented quick actions for Task table
Updated admin settings to introduce quick settings.
This commit is contained in:
admin
2023-02-03 12:49:13 -08:00
parent fa5fc665c1
commit dc8bc52dae
53 changed files with 2043 additions and 82 deletions

View File

@ -19,12 +19,6 @@
<type>string</type>
<value>{&#13;
"display": "form",&#13;
"settings": {&#13;
"pdf": {&#13;
"id": "1ec0f8ee-6685-5d98-a847-26f67b67d6f0",&#13;
"src": "https://files.form.io/pdf/5692b91fd1028f01000407e3/file/1ec0f8ee-6685-5d98-a847-26f67b67d6f0"&#13;
}&#13;
},&#13;
"components": [&#13;
{&#13;
"title": "Main details",&#13;
@ -96,7 +90,7 @@
"title": "General",&#13;
"theme": "primary",&#13;
"collapsible": false,&#13;
"key": "general",&#13;
"key": "generalAdministration",&#13;
"type": "panel",&#13;
"label": "Panel",&#13;
"input": false,&#13;
@ -105,7 +99,7 @@
{&#13;
"label": "General",&#13;
"tableView": false,&#13;
"key": "general1",&#13;
"key": "general",&#13;
"type": "container",&#13;
"input": true,&#13;
"components": [&#13;
@ -153,7 +147,7 @@
},&#13;
{&#13;
"label": "Log Administration",&#13;
"key": "log_administration",&#13;
"key": "logAdministration",&#13;
"components": [&#13;
{&#13;
"title": "Log Administration",&#13;
@ -267,9 +261,283 @@
}&#13;
]&#13;
},&#13;
{&#13;
"label": "Quick Actions",&#13;
"key": "quickActionsAdministration",&#13;
"components": [&#13;
{&#13;
"title": "Quick Actions",&#13;
"theme": "primary",&#13;
"collapsible": false,&#13;
"key": "quickActionsPanel",&#13;
"type": "panel",&#13;
"label": "Panel",&#13;
"input": false,&#13;
"tableView": false,&#13;
"components": [&#13;
{&#13;
"label": "Quick Actions",&#13;
"tableView": false,&#13;
"key": "quickActions",&#13;
"type": "container",&#13;
"input": true,&#13;
"components": [&#13;
{&#13;
"label": "Add UI Action button to Task tables",&#13;
"tableView": false,&#13;
"defaultValue": false,&#13;
"key": "taskUiAction",&#13;
"type": "checkbox",&#13;
"input": true&#13;
},&#13;
{&#13;
"label": "Task",&#13;
"tableView": false,&#13;
"key": "task",&#13;
"type": "container",&#13;
"input": true,&#13;
"components": [&#13;
{&#13;
"title": "Task Action Buttons",&#13;
"theme": "info",&#13;
"collapsible": false,&#13;
"key": "taskActionButtons",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.taskUiAction",&#13;
"eq": "true"&#13;
},&#13;
"type": "panel",&#13;
"label": "Panel",&#13;
"input": false,&#13;
"tableView": false,&#13;
"components": [&#13;
{&#13;
"label": "Columns",&#13;
"columns": [&#13;
{&#13;
"components": [&#13;
{&#13;
"label": "All Task Tables",&#13;
"tableView": false,&#13;
"key": "allTaskTables",&#13;
"type": "checkbox",&#13;
"input": true,&#13;
"defaultValue": false&#13;
}&#13;
],&#13;
"width": 6,&#13;
"offset": 0,&#13;
"push": 0,&#13;
"pull": 0,&#13;
"size": "md",&#13;
"currentWidth": 6&#13;
},&#13;
{&#13;
"components": [&#13;
{&#13;
"label": "Inherit on Task extended tables",&#13;
"tooltip": "Show UI Action button on selected tables AND extended tables.",&#13;
"tableView": false,&#13;
"defaultValue": false,&#13;
"key": "inheritOnTaskExtendedTables",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.task.allTaskTables",&#13;
"eq": "false"&#13;
},&#13;
"type": "checkbox",&#13;
"input": true&#13;
}&#13;
],&#13;
"width": 6,&#13;
"offset": 0,&#13;
"push": 0,&#13;
"pull": 0,&#13;
"size": "md",&#13;
"currentWidth": 6&#13;
}&#13;
],&#13;
"key": "columns1",&#13;
"type": "columns",&#13;
"input": false,&#13;
"tableView": false&#13;
},&#13;
{&#13;
"label": "Task Related Tables",&#13;
"widget": "choicesjs",&#13;
"tableView": true,&#13;
"multiple": true,&#13;
"dataSrc": "url",&#13;
"data": {&#13;
"url": "/api/x_355681_fa/fulfillment_automater/extended-tables/task",&#13;
"headers": [&#13;
{&#13;
"key": "",&#13;
"value": ""&#13;
}&#13;
]&#13;
},&#13;
"idPath": "name",&#13;
"valueProperty": "name",&#13;
"validate": {&#13;
"required": true&#13;
},&#13;
"key": "taskRelatedTables",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.task.allTaskTables",&#13;
"eq": "false"&#13;
},&#13;
"type": "select",&#13;
"selectValues": "result",&#13;
"disableLimit": false,&#13;
"input": true&#13;
}&#13;
]&#13;
}&#13;
]&#13;
},&#13;
{&#13;
"label": "Add UI Action button to Service Catalog tables",&#13;
"tableView": false,&#13;
"defaultValue": false,&#13;
"key": "serviceCatalogUiAction",&#13;
"type": "checkbox",&#13;
"input": true&#13;
},&#13;
{&#13;
"label": "Service Catalog",&#13;
"tableView": false,&#13;
"key": "serviceCatalog",&#13;
"type": "container",&#13;
"input": true,&#13;
"components": [&#13;
{&#13;
"title": "Service Catalog Action Buttons",&#13;
"theme": "info",&#13;
"collapsible": false,&#13;
"key": "serviceCatalogActionButtons1",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.serviceCatalogUiAction",&#13;
"eq": "true"&#13;
},&#13;
"type": "panel",&#13;
"label": "Panel",&#13;
"input": false,&#13;
"tableView": false,&#13;
"components": [&#13;
{&#13;
"label": "Advanced Warning",&#13;
"attrs": [&#13;
{&#13;
"attr": "",&#13;
"value": ""&#13;
}&#13;
],&#13;
"content": "&lt;div class=\"alert alert-info\" role=\"alert\"&gt;\n &lt;h4&gt;Important&lt;/h4&gt;\n &lt;p&gt;\n Due to the way ServiceNow configured the table 'sc_cat_item', you need to create the UI Action yourself.\n &lt;/p&gt;\n &lt;p&gt;\n Instruction on how to do this can be found &lt;a href='#'&gt;here.&lt;/a&gt;\n &lt;/p&gt;\n&lt;/div&gt;",&#13;
"refreshOnChange": false,&#13;
"key": "advancedWarning",&#13;
"type": "htmlelement",&#13;
"input": false,&#13;
"tableView": false&#13;
},&#13;
{&#13;
"label": "Columns",&#13;
"columns": [&#13;
{&#13;
"components": [&#13;
{&#13;
"label": "All Service Catalog Tables",&#13;
"tableView": false,&#13;
"defaultValue": false,&#13;
"key": "allServiceCatalogTables",&#13;
"type": "checkbox",&#13;
"input": true&#13;
}&#13;
],&#13;
"width": 6,&#13;
"offset": 0,&#13;
"push": 0,&#13;
"pull": 0,&#13;
"size": "md",&#13;
"currentWidth": 6&#13;
},&#13;
{&#13;
"components": [&#13;
{&#13;
"label": "Inherit on Service Catalog extended tables",&#13;
"tooltip": "Show UI Action button on selected tables AND extended tables.",&#13;
"tableView": false,&#13;
"defaultValue": false,&#13;
"key": "inheritOnServiceCatalogExtendedTables",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.serviceCatalog.allServiceCatalogTables",&#13;
"eq": "false"&#13;
},&#13;
"type": "checkbox",&#13;
"input": true&#13;
}&#13;
],&#13;
"width": 6,&#13;
"offset": 0,&#13;
"push": 0,&#13;
"pull": 0,&#13;
"size": "md",&#13;
"currentWidth": 6&#13;
}&#13;
],&#13;
"key": "columns2",&#13;
"type": "columns",&#13;
"input": false,&#13;
"tableView": false&#13;
},&#13;
{&#13;
"label": "Service Catalog related tables",&#13;
"widget": "choicesjs",&#13;
"tableView": true,&#13;
"multiple": true,&#13;
"dataSrc": "url",&#13;
"data": {&#13;
"url": "/api/x_355681_fa/fulfillment_automater/extended-tables/sc_cat_item",&#13;
"headers": [&#13;
{&#13;
"key": "",&#13;
"value": ""&#13;
}&#13;
]&#13;
},&#13;
"idPath": "name",&#13;
"valueProperty": "name",&#13;
"validate": {&#13;
"required": true&#13;
},&#13;
"key": "serviceCatalogRelatedTables",&#13;
"conditional": {&#13;
"show": true,&#13;
"when": "quickActions.serviceCatalog.allServiceCatalogTables",&#13;
"eq": "false"&#13;
},&#13;
"type": "select",&#13;
"selectValues": "result",&#13;
"disableLimit": false,&#13;
"input": true&#13;
}&#13;
]&#13;
}&#13;
]&#13;
}&#13;
]&#13;
}&#13;
]&#13;
}&#13;
]&#13;
},&#13;
{&#13;
"label": "Advanced Settings",&#13;
"key": "advanced_settings",&#13;
"key": "advancedSettings",&#13;
"components": [&#13;
{&#13;
"title": "Advanced Settings",&#13;