Description
Global Text Search for Admin users is returning inactive and retired KB Articles.
Steps to Reproduce
- Navigate to Knowledge Base > Retired
- Copy one of these KB articles number and enter this into the Global Text Search
Workaround
Create a before query business rule against the kb_knowledge table that filters these out if the user is doing a text search. For example:
// It is being used to work around PRB627409 where retired articles are being pulled back by knowledge search
// First we grab the URL and turn it into a string
var action = gs.action.getGlideURI().toString();
// Next we check to see if "textsearch.do" is in the URL and if so we exclude retired kb_knowledge records
if(action.search("textsearch.do") > -1) {
current.addQuery('workflow_state','!=','retired');
}
For Jakarta version, instead of "textsearch.do" use "text_search_exact_match.do".
Additional Information
By default, admins are given access to retired KB articles. Regular users will not be able to access retired KB Articles via Global Text search, unless an admin has granted them read access to retired records.
Related Problem: PRB627409