Expired articles are visible in global search
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Even after the knowledge article’s Valid To date has been passed, the article is still visible to all users in the global search(Native UI). The workflow state of this article is still published, and valid to date is passed
10 REPLIES 10
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
3 weeks ago
Add a Scheduled Job
Automatically retire articles when Valid To is reached.
var gr = new GlideRecord('kb_knowledge');
gr.addQuery('valid_to', '<=', gs.nowDateTime());
gr.addQuery('workflow_state', 'published');
gr.query();
while (gr.next()) {
gr.workflow_state = 'retired';
gr.update();
}