Knowledge feedback comment mandatory

Community Alums
Not applicable

How can I have this box pop up, if a knowledge article is rated low or marked as unhelpful when a knowledge article is viewed from the backend. The portal shows this (as shown below), but when rated from the back end it does not ask for feedback. Or if there's any other way to make it mandatory before it's submitted, upon clicking on helpful is no

MuAl_0-1670535439584.png

 

2 REPLIES 2

Gunjan Kiratkar
Kilo Patron
Kilo Patron

Hi @Community Alums ,

Check below thread :-

https://www.servicenow.com/community/developer-forum/make-details-on-sp-knowledge-feedback-mandatory/m-p/1858349 

 

Solution:-

You need to clone  Knowledge Article Content widget and in client controller you can make this as mandatory. Look for the below function

 

c.submitFeedbackTask = function(){
        if(!c.data.reason){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }

// add the below bold statement
        if(!c.data.details){
            c.flagMessage = "${Please provide the mandatory details}";
            $("#detailsComment").focus();
            return false;
        }
        else{
            c.submitted = true;
            c.closePopup();
        }
    }

Please Mark My Response as Correct/Helpful based on Impact
Regards,
Gunjan Kiratkar
2X ServiceNow MVP
Community Rising Star 2022
Youtube : ServiceNow Guy

Community Alums
Not applicable

Hi Gunjan. this is for the portal side, i was wondering if something similar can be done on the backend. In a UI macro i think, or just to make the comments mandatory if rating is received or article is marked as not helpful