Look For Certification results of individual Cis before closing task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:01 AM - edited 03-03-2025 07:49 PM
I Need to check in a business rule, if there are Cis certified with Empty attributes on Certification task.
Where is this information for each CI and its certification status stored at?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 09:14 AM
Yes, you can check and also abort the update.
Bussiness rule Conditions :
When: Before
Update: (Checked)
Filter Condition: State changes to Closed
Script :
(function executeRule(current, previous /*null when async*/) {
var emptyFields = [];
// List of fields you want to check for empty values
var fieldsToCheck = ['short_description', 'assigned_to', 'due_date', 'u_custom_field'];
fieldsToCheck.forEach(function(field) {
if (!current.getValue(field)) { // Check if the field is empty
emptyFields.push(field);
}
});
// If any required fields are empty, prevent closure and show a message
if (emptyFields.length > 0) {
gs.addErrorMessage('The following fields must be filled before closing: ' + emptyFields.join(', '));
current.setAbortAction(true); // Prevents the record from being updated
}
})(current, previous);
Please mark it helpful
Regards
Priyatam
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-03-2025 01:31 PM
This information is not stored in any of the fields on the certification table, It is shown when certifying on CMDB Work space. I'm trying to figure out where that information is stored, so that I can create a Business rule