how to restrict incident creation from calendar invites for DL
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-05-2025 05:43 AM
As of now we are creating an Incidents via Inbound action , but when there is a calendar invite , still it is creating Incident , How to restrict that ?
I am not able to restrict subject , as it can be any
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
a month ago
var queryCtg = JSON.parse(gs.getProperty('wf.chg.attestation.filter.conditions')).querychg || '';
var queryChg = JSON.parse(gs.getProperty('wf.chg.attestation.filter.conditions')).querychg || '';
var queryCTask = JSON.parse(gs.getProperty('wf.chg.attestation.filter.conditions')).queryctask || '';
{
"querychg": "state=3^typeINnormal,expedited^closed_atONLast month@javascript:gs.beginningOfLastMonth()@javascript:gs.endOfLastMonth()^production_system=true",
"queryctask": "state=3^change_task_type=testing^u_sub_typeINInfrastructure,infrastructure_no_test_plan^change_request.production_system=true"
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
// Step 1: Check raw property value
var rawProp = gs.getProperty('wf.chg.attestation.filter.conditions');
gs.info('RAW PROPERTY: ' + rawProp);
// Step 2: Check if JSON parses
var parsed = {};
try {
parsed = JSON.parse(rawProp);
gs.info('PARSED OK: ' + JSON.stringify(parsed));
} catch(e) {
gs.error('JSON PARSE FAILED: ' + e.message);
}
// Step 3: Check individual keys
gs.info('qa_attestation: ' + parsed.qa_attestation);
gs.info('queryinfrachg: ' + parsed.queryinfrachg);
gs.info('queryinfractask: ' + parsed.queryinfractask);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
Hello @RudhraKAM
You can adhere either of the two below:
1. Inbound action "When to run" Filter Conditions as Headers does not contain ":EE_MeetingMessage"
2. Add below to the Inbound Action Script under Actions tab:
// Abort if sys_email headers contain ":EE_MeetingMessage"
var sysEmailGr = new GlideRecord('sys_email');
if (sysEmailGr.get(email.sys_id)) {
var headers = sysEmailGr.getValue('headers') || '';
if (headers.indexOf(':EE_MeetingMessage') > -1) {
return;
}
Hope that helps!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
4 weeks ago - last edited 4 weeks ago
// Line 17 - TEMPORARY DEBUG
var rawProp = gs.getProperty('wf.chg.attestation.filter.conditions');
gs.addInfoMessage('RAW PROPERTY: ' + rawProp);
var parsed = {};
try {
parsed = JSON.parse(rawProp);
gs.addInfoMessage('PARSED OK - queryinfrachg: ' + parsed.queryinfrachg);
gs.addInfoMessage('PARSED OK - queryinfractask: ' + parsed.queryinfractask);
} catch(e) {
gs.addErrorMessage('JSON PARSE FAILED: ' + e.message);
}
var queryChg = parsed.queryinfrachg || '';
var queryCTask = parsed.queryinfractask || '';
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
2 weeks ago
var changeNumber = 'CHG0012345'; // <-- Change this to your Change Request number
var newPlannedStart = '2026-06-15 09:00:00'; // Format: YYYY-MM-DD HH:MM:SS
var newPlannedEnd = '2026-06-15 17:00:00'; // Format: YYYY-MM-DD HH:MM:SS
var gr = new GlideRecord('change_request');
gr.addQuery('number', changeNumber);
gr.query();
if (gr.next()) {
gr.setValue('start_date', newPlannedStart);
gr.setValue('end_date', newPlannedEnd);
gr.setWorkflow(false); // skip business rules
gr.autoSysFields(false); // skip sys_updated_on / sys_updated_by changes
gr.update();
gs.print('Updated ' + changeNumber + ' → Start: ' + newPlannedStart + ' | End: ' + newPlannedEnd);
} else {
gs.print('Change Request not found: ' + changeNumber);
}