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
18 changes: 18 additions & 0 deletions Client Scripts/Redact Sensitive Information/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Redact Sensitive Information

When users create an incident or HR case via the self-service portal, they may occasionally enter sensitive information (e.g., personal identifiers, account numbers).
To prevent misuse of such data, **fulfillers** can redact sensitive information from the short description or description fields.

This ensures that confidential information is safeguarded and not accessible for unauthorized use or distribution.

## Prerequisites

1. Custom Field:
Add a custom field to the form to hold the redacted text.
Example: u_redact (Redact).

2. OnSubmit Client Script:
Create an onsubmit client script to redact sensitive information.
This script will update the **short description** and **description** field with custom value as required.

**Note**: Data that has been redacted cannot be recovered.
17 changes: 17 additions & 0 deletions Client Scripts/Redact Sensitive Information/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
function onSubmit() {
var redact = g_form.getValue("u_redact"); //custom field on the form to redact information
if (redact == true) {
var answer = confirm(getMessage('Do you want to redact sensitive information')); //Confirm the user who wants to redact information
if (answer) {
g_form.setValue('short_description', 'Short Description is redacted as it contained sensitive information'); //Custom short_description post redacting
g_form.setValue('description', 'Description is redacted as it contained sensitive information'); //Custom description post redacting
g_form.setValue('work_notes', 'The Description and Short Description has been redacted.'); //Adding work notes to track who redacted the short_description and description
g_form.setReadOnly('short_description', true);
g_form.setReadOnly('description', true);
g_form.setReadOnly('u_redact', true)
} else {
g_form.setValue('u_redact', false);
return false;
}
}
}
Loading