From 2724cfeb21bdaf8c823ff156804e404c59202630 Mon Sep 17 00:00:00 2001 From: prash5595 <37541035+prash5595@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:08:15 -0400 Subject: [PATCH] Adding placeholder text on Resolution notes Client Script (#1535) * Create README.md * Create script.js --- .../README.md | 15 +++++++++++++++ .../script.js | 10 ++++++++++ 2 files changed, 25 insertions(+) create mode 100644 Client Scripts/Adding Placeholder on Resolution Notes/README.md create mode 100644 Client Scripts/Adding Placeholder on Resolution Notes/script.js diff --git a/Client Scripts/Adding Placeholder on Resolution Notes/README.md b/Client Scripts/Adding Placeholder on Resolution Notes/README.md new file mode 100644 index 0000000000..4daccf7821 --- /dev/null +++ b/Client Scripts/Adding Placeholder on Resolution Notes/README.md @@ -0,0 +1,15 @@ +# Adding Placeholder Text in Resolution Notes + +To maintain consistency and ensure specific information is captured in resolution notes, process owners may require fulfillers to follow a predefined format when resolving tickets. + +By adding **placeholder** text in the resolution notes, fulfillers are reminded of the required information(e.g., Root cause, Steps taken, Resolution provided), reducing the risk of missing important details. The placeholder disappears as soon as the fulfiller begins entering their notes, ensuring it doesn't interfere with their input. + +## How It Works + +### When? +- The placeholder text is automatically added when the state of the ticket changes to Resolved (6). + +### What Happens? +- A placeholder text appears in the resolution notes field to guide the fulfiller. +- As soon as the fulfiller starts typing, the placeholder disappears. +- This ensures consistency and alignment with the process requirements. diff --git a/Client Scripts/Adding Placeholder on Resolution Notes/script.js b/Client Scripts/Adding Placeholder on Resolution Notes/script.js new file mode 100644 index 0000000000..1548b8796c --- /dev/null +++ b/Client Scripts/Adding Placeholder on Resolution Notes/script.js @@ -0,0 +1,10 @@ +function onChange(control, oldValue, newValue, isLoading, isTemplate) { + if (isLoading || newValue === '') { + return; + } + var res = g_form.getElement('close_notes'); + if (newValue == 6) + res.placeholder = "1. Root Cause" + "\n" + "2. Steps taken" + "\n" + "3. Resolution provided"; //Placeholder text as required + else + res.placeholder = ""; +}