How to enable comments on KB articles that are in all workflow states not just published?

Lola B
Kilo Expert

Hello,

We added two custom workflow states for our Knowledge KCS implementation. The custom workflow states are "Work in Progress" and "Draft"; however, when end-users view KB's in these states they cannot add comments to the KB. Only KB's in state of "Approver/Published" can make comments.

Is there a way to enable to expand KB comments for all workflow states?

1 ACCEPTED SOLUTION

Hi Srini,



I heard from ServiceNow support that the UI script, KBViewArticle, would need to be modified to include the custom workflow status we created "Work in Progress". There are a few lines of code to modify to include it because out of the box it's designed to only allow Published articles to have comments.



I adjusted the coding to allow where (this.isPublished()) to be changed to (this.isWIP())


if (this.isWIP()) {


    $j('#articleFooterSection').removeAttr('style'); // unhide


  }



This allows for my custom state to have comments display on the View Article page.



Thanks,



Lola


View solution in original post

4 REPLIES 4

Rama Chandra D
Kilo Guru

Hi Iola,



Check if the read-only property to comments field is set by which script ( UI policy or a BR or a client script). Once you identify it, you can include other states as well in the logic.



Darshak


Srinivas Balusu
Kilo Guru

Hi Lola,



After doing some searching on system UI Pages and UI Macros   related to knowledge (like kb_view,kb_feedback....) I found the below.



The comments is an iframe with source as $knowledge_feedback.do page which I believe has the condition on state too (as per your req). This would be a system application file with no access to it.



But a property is used to control the users who has access to it. But it is only for a published article, Which may not be a big help for you.



So, I don't think it is possible.


Hi Srini,



I heard from ServiceNow support that the UI script, KBViewArticle, would need to be modified to include the custom workflow status we created "Work in Progress". There are a few lines of code to modify to include it because out of the box it's designed to only allow Published articles to have comments.



I adjusted the coding to allow where (this.isPublished()) to be changed to (this.isWIP())


if (this.isWIP()) {


    $j('#articleFooterSection').removeAttr('style'); // unhide


  }



This allows for my custom state to have comments display on the View Article page.



Thanks,



Lola


Awesome ! Good to know. Thanks for posting the solution too.