Skip to content

Automated incident categorization based on keywords #1109

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
(function() {
var keywordCategoryMap = {
'network': 'Network Issues',
'server': 'Server Issues',
'database': 'Database Issues',
'application': 'Application Issues',
'login': 'User Access Issues',
'password': 'User Access Issues',
'error': 'General Errors',
'crash': 'Application Issues',
'slow': 'Performance Issues',
};

function categorizeIncident(shortDescription, description) {
var combinedText = (shortDescription + ' ' + description).toLowerCase();

for (var keyword in keywordCategoryMap) {
if (combinedText.indexOf(keyword) !== -1) {
return keywordCategoryMap[keyword];
}
}
return 'Uncategorized';

if (current.operation() === 'insert') {
var category = categorizeIncident(current.short_description, current.description);
current.category = category;
current.update();

gs.info('Incident ' + current.number + ' categorized as: ' + category);
}
})();
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Overview** : This Business Rule will automatically categorize incidents based on the defined keywords when a new incident is created.

**Setting Up the Business Rule**

**Name**: Automated Incident Categorization

**Table**: Incident [incident]

**When**: Before

**Insert**: Checked
Loading