New Record Producers or Catalog Items not showing in the Topics in Employee Center

kmolson73
Tera Expert

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? 

10 REPLIES 10

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. 

We the exact same issue/question - did you ever get this figured out? 

Community Alums
Not applicable

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

@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?