New Record Producers or Catalog Items not showing in the Topics in Employee Center
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-20-2024 11:22 AM
We currently have Topics setup for Employee Center based off of our existing Service Catalog/Categories. When we add new Record Producers or Catalog Items to categories they are not getting automatically added to the Topics. I was doing some digging and found a scheduled job called Surface New Unconnected Content of Categories which is set to run weekly but even running it by clicking execute the new items still do not show up under the topics (even after clearing cache). Also, tried the link in the Topic to Check for new content in categories and it comes up with nothing. The only way to get them to show is to manually add them to the Connected Content (or remove the category all together and re-add it). Shouldn't this work automatically? Why doesn't the scheduled job pick them up? I have checked the script includes are there for the job and sys properties look correct. Thoughts?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-23-2024 06:10 AM
Yes, could do that but again that would be a manual process. The scheduled job should be picking up any new content that is added to the category and add it to the Topic that category is associated with.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 10:35 AM
We the exact same issue/question - did you ever get this figured out?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 10:46 AM
additional info as to why we believe this should work
https://support.servicenow.com/ideas?id=view_idea&sysparm_idea_id=b240004cdbc241d0679499ead3961945&s...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 10:59 AM
Hey @bvlo
Here is the snippet from "TopicCategoryContentSurfacingUtilSNC._identifyNewContentInCategoriesForCatalog" that I think results in this NOT working for old catalog items:
var last_run_date = gs.getProperty(this.JOB_LAST_EXECUTION_PROPERTY);
var query = "sc_categoryIN" + Object.keys(categoryContentMap).join(",");
if (last_run_date)
query += "^sc_cat_item.sys_created_on>=" + last_run_date;
Notice the query filters based on the catalog item date.
Looking at this again.... @kmolson73 maybe it would be worth overriding this method entirely? In the Script Include "TopicCategoryContentSurfacingUtil", you could override that method to be the following:
_identifyNewContentInCategoriesForCatalog: function(categoryContentMap) {
var last_run_date = gs.getProperty(this.JOB_LAST_EXECUTION_PROPERTY);
var query = "sc_categoryIN" + Object.keys(categoryContentMap).join(",");
// COMMENT THESE LINES OUT
// if (last_run_date)
// query += "^sc_cat_item.sys_created_on>=" + last_run_date;
var contentGr = this._getFilteredGlideRecord("sc_cat_item_category", query);
while (contentGr.next()) {
var categoryId = contentGr.sc_category.toString();
var contentId = contentGr.sc_cat_item.toString();
var content_creation_date = contentGr.sc_cat_item.sys_created_on.toString();
categoryContentMap[categoryId][contentId] = {
contentId: contentId,
content_creation_date: content_creation_date
};
}
},
Note: I did NOT test this, just an idea.
Hope this helps!
~Nick
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎09-27-2024 11:53 AM
@Community Alums
I am not seeing this work for new catalog items. I am reading that @kmolson73 is having the same issue. @kmolson73 can you confirm this?