Make field Comments Mandatory when fail to certify on Data certification tasks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-11-2022 03:25 PM
we have installed Data certification plugin. When assigned to failed to certify the certification element, we want to Make comments Mandatory. And also, Not allow assigned to certify empty values of Certification elements in certification task.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-27-2023 12:54 AM
Did you get any solution on this?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
10-18-2023 09:24 AM
I am also looking for a solution for this. I found another answer from the link below, but its not working.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-27-2024 05:37 AM
Hello,
all you have to do is to change UI Macro "cert_task_data_button_row".
In the <script> part add this code:
// Function to validate the certification comment
function validateCertComment() {
var mandatoryComment = "${gs.getMessage('Please fill in the mandatory comment before failing to certify.')}";
var commentInput = document.getElementById('cert_comment');
if (commentInput.value == '' || commentInput.value == commentInput.alt) {
alert(mandatoryComment);
return false;
}
return true;
}
Change in the script the button slightly:
<span>
<image class="pointerhand" src="images/certification_fail.png" id="fail_checked_elements" onclick="if (validateCertComment()) { failCheckedElements() };" title="${JS:gs.getMessage('Fail certification for checked elements')}"/>
</span>
Also the default text for cert_comment element could be changed. Do not forget then to change UI Messages:
<span id="cert_comment_span">
<input id="cert_comment" class="comment_out" size="40"
onkeypress="$('info_2').setStyle({visibility:''});if (event.keyCode == 13) Event.stop(event);"
onfocus="commentFocus(this);"
onblur="commentBlur(this);"
alt="${JS:gs.getMessage('Mandatory comment for checked elements')}"
value="${JS:gs.getMessage('Mandatory comment for checked elements')}"
default_value="${JS:gs.getMessage('Mandatory comment for checked elements')}"/>
</span>
Please mark my answer as Correct if you find it useful.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-18-2024 04:23 AM
This worked! thank you!