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

@ -0,0 +1,44 @@
<?xml version="1.0" encoding="UTF-8"?><record_update table="sys_ui_macro">
<sys_ui_macro action="INSERT_OR_UPDATE">
<active>true</active>
<category>general</category>
<description/>
<media_type/>
<name>create_new_fp</name>
<scoped_name>x_355681_fa_create_new_fp</scoped_name>
<sys_class_name>sys_ui_macro</sys_class_name>
<sys_created_by>admin</sys_created_by>
<sys_created_on>2023-02-03 17:20:07</sys_created_on>
<sys_id>828ad1e1973421105838bfb3f153af9a</sys_id>
<sys_name>create_new_fp</sys_name>
<sys_package display_value="Fulfilment Automater" source="x_355681_fa">c04afa629713111093a8337e6253af6d</sys_package>
<sys_policy/>
<sys_scope display_value="Fulfilment Automater">c04afa629713111093a8337e6253af6d</sys_scope>
<sys_update_name>sys_ui_macro_828ad1e1973421105838bfb3f153af9a</sys_update_name>
<xml><![CDATA[<?xml version="1.0" encoding="utf-8" ?>
<j:jelly trim="false" xmlns:j="jelly:core" xmlns:g="glide" xmlns:j2="null" xmlns:g2="null">
<j:set var="jvar_n" value="create_new_fp_${ref}"/>
<span id="${jvar_n}" onclick="createNewFP('${ref}')" title="Create new Fulfillment Plan" alt="Create new" tabindex="0" class="btn btn-default icon-open-document-new-tab">
<span class="sr-only">Create new FP</span>
</span>
<script>
function createNewFP(reference) {
var currentTable = g_form.getTableName();
var type;
switch(currentTable){
case "x_355681_fa_service_catalog_trigger":
var recordProducer = g_form.getValue('condition_table') != "sc_req_item";
type = recordProducer ? "task_table" : "service_catalog_item"
break;
default:
type = "task_table";
break;
}
window.open("/x_355681_fa_fulfillment_plan.do?sysparm_query_override=run_on_table=" + g_form.getValue('condition_table') + "^type=" + type, '_blank');
}
</script>
</j:jelly>]]></xml>
</sys_ui_macro>
</record_update>