Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
**Business Rule**

Table : Any Custom Table or (Incident,Problem , Change)...
Active : true
When : before
Update : true
order : 100

condition : gs.getUser().getUserName() == 'integration.user/Web services User'

The rule must only run when the update is coming from the dedicated integration user to avoid impacting manual user updates, Can Update Fields to check as Required

This business rule is designed to prevent unnecessary and redundant updates to records that are synchronized with external systems (e.g., Jira, Azure DevOps, or a custom application) via integration / E bonding

This rule executes a check to ensure that the fields critical to the integration (Work Notes, Comments, State) have genuinely changed before allowing the update to process.
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
(function executeRule(current, previous) {

if (current.isNewRecord() || !current.isValidRecord() || current.operation() == 'delete') {
return;
}
var fieldsToCheck = ['work_notes', 'comments', 'state'];
var allFieldsSame = true;
for (var i = 0; i < fieldsToCheck.length; i++) {
var field = fieldsToCheck[i];
if (current.changes.call(current, field) && current[field].toString() !== previous[field].toString()) {
allFieldsSame = false;
break;
}
}
if (allFieldsSame) {
gs.info('BR skipped redundant integration update for ' + current.sys_class_name + ': ' + current.number);
current.setAbortAction(true);
}

})(current, previous);
Loading