Knowledge articles that are past their Valid To date are not appearing in search results. This undermines the system of procedures, article states, and scripts that has been developed and deployed. Regardless of the Valid To date, articles in the P

Ajay Cheruku
Tera Expert

Knowledge articles that are past their Valid To date are not appearing in search results. This undermines the system of procedures, article states, and scripts that has been developed and deployed.     Regardless of the Valid To date, articles in the Provisionally Published, Published or Pending Retirement states should be visible to search. Valid To is intended as a trigger for the nightly script that moves articles to Pending Retirement and then Retired state.

Someone help me solving this   would be appreciated .

1 ACCEPTED SOLUTION

Hi Ajay,



Knowledge search results are shown based on whether or not they're in published state. When an article is retired, it is no longer published, which is why you aren't seeing them returned in the result set. To allow for these articles to be shown, locate the glide.knowman.show_unpublished property and set it to true. Next, set the value for the glide.knowman.section.view_roles.stagesAndRoles property to 'retired:itil;pending_retirement:itil' (Or whichever roles you want to be able to view non-published articles).



*If you do not see these properties in your instance, you can add it following these steps:


Add a property



Please note that this will also return results in the draft and review stages as well, since these are also unpublished. To address this, you can set a before query business rule on kb_knowledge to exclude results when queried through text search.



function onBefore(current, previous) {


var action = gs.action.getGlideURI().toString();


if(action.search("angular.do") > -1) {


current.addQuery('workflow_state', '!=', 'draft');


current.addQuery('workflow_state', '!=', 'review');


}


}



I tested this in a sandbox Istanbul instance and confirmed it works the way I believe you wanted it to. Please try this out and let me know what you think.



Best regards,



Brian


View solution in original post

8 REPLIES 8

Hey Ajay,



Did you get the 'glide.knowman.show_unpublished' property set as well? This is the one that actually enables the search results to return the non-published items. The property in your screenshot is the one that specifies which roles/stages in which it's applied. For this property though, there are 2 'retired' workflow stages for Knowledge articles - 'pending_retirement' and 'retired'. If you're testing with an article that has been retired, you'll want to make sure it gets added there as well.



Best regards,



Brian


Community Alums
Not applicable

I tried your solution. So, first I checked "Show unpublished articles in Knowledge Base portal" then in the property glide.knowman.section.view_roles.stagesAndRoles, I added this line to the value field Ready to Publish:knowledge_admin,admin;published_under_review:itil,knowledge;pending_retirement:knowledge_admin,admin;retired:knowledge_admin,admin;

It works fine for user with other roles. But in our system, we don't have any role for end user. How do I pull the published_under_review state to be visible for end user (not having any role) in the knowledge portal?

richelle_pivec
Mega Guru

I actually leave the knowledge search alone (as I don't want team members seeing expired, retired, draft, or review state knowledge). Instead I look at the list of "Edit All" under the Knowledge section of the Navigational Menu when I need to review the Valid To. That way I can quickly sort on the "Valid To" date and see any that are past it. I also have a report that sends to me once a month with any that are passed due, so I can follow-up with anyone who has a KB past its valid to date.



On their own, my team members would never notice (or care) if the Valid To date was passed (or what state the KB was in). They would get the result and use it because, to them, it returned in the search. Therefore it must be valid.



Richelle


Michael QCKM
Tera Guru

Maybe I'm missing something, but I thought that was the ENTIRE function of the Valid to Date? To hide articles when they pass that date so they're not searchable?  It doesn't affect their Workflow state at all, so you need to be careful and "deal" with those, otherwise they will skew your Reports (a report of Published articles will still show InValid dated articles because they are still Published)