Display Active KB articles on Service portal


Issue Summary

IT Knowledge Base is used to publish knowledge articles as News on the widget. When article is created, it shows in the news feed. But when the article is made inactive, it still shows on the News feed. 


Most Probable Cause

OOB behavior is that by default, all the knowledge articles that are in published state show up on the widget. 


Solution Proposed

Adding one more query on the service portal widget helped to resolve the issue.

Under the widget navigate to Server Script and add additional query line as below 


This line has to be added under z.addQuery('workflow_state','published'); 

Now, the widget will pick only the ones that are active in the instance.