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

Kalaiarasan Pus
Giga Sage

A knowledge articles valid To date is used to make sure that the valid information is being presented to users and also to make sure that the information has not become stale. So in short, instead of fixing the flaws in the review process you are trying to eliminate the process using the tool. Any tool that you use should be used to supplement the process and not to suppress it.



My advice would be to set up reminder email if not already present or set up tasks for authors to review and have them update their knowledge article instead. This is just my advise and you are free to take or ignore it.


Thanks for your advise kalaiarasan but i want retired articles also should visible in knowledge search .


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


thanks for your response Brian even i followed same procedure but for some reason its not working in my instance.


Here i have set values and made glide.knowman.show_unpublished property and set it to true.



find_real_file.png