Trying to populate the OOB Stories Related list on a Change Request record

kdelbridge
Tera Expert

I am working on a requirements story that will allow us to document on the story record the change used to move a story. We added a new field on the story form that references the [change_request] table.

 

I did notice that there is a "Stories" related list already on a change_request form view. What I can't figure out is how to populate that related list with my stories that now have this particular Change Request populated to the new field on the story form that was added.

 

The only way I can get these to show is to add my new reference field to the related list view. From speaking with our architect, we'd really like for the stories that will be deployed via the select change to show up in the OOB stories related list. Any idea how to accomplish this?

 

 

 

 

1 REPLY 1

vijaydodla
Giga Guru

Based on ServiceNow's architecture, there is actually no standard Out-of-the-Box (OOB) "Stories" related list on the core Change Request form. Because Agile Development and ITSM are distinct modules, they don't share a direct, baseline reference field.

If you are seeing an existing "Stories" related list on your Change Request form, it is likely one of two things:

  1. A Custom Relationship or Many-to-Many (M2M) table built by a previous administrator in your instance.
  2. A related list introduced by a specific plugin (like SAFe, DevOps, or Digital Product Release).

Why isn't it populating?

The existing related list is hardcoded to look for a specific data structure (e.g., a different reference field, the parent field, or an M2M table). It does not automatically know about the brand-new custom reference field you just added to the Story (rm_story) table.

To accomplish your architect's goal of having your stories show up in that specific related list, you need to find out how that list is built and point it to your new field. Here is how to do it:

 

Step 1: Identify the existing Related List

  1. Open a Change Request record.
  2. Right-click the form header and select Configure > Related Lists.
  3. Look at the "Selected" column to find the exact technical name of the "Stories" list.
    • If it says something like Story -> Parent, it is looking at the baseline parent field on the task table.
    • If it just says Stories, it is likely a Defined Relationship or an M2M table.

Step 2: Apply the Fix based on the List Type

Scenario A: It is a Defined Relationship (Most Likely) If a previous admin created a relationship to show stories, you just need to update its script to look at your new field.

  1. Navigate to System Definition > Relationships.
  2. Search for the relationship named Stories (where Applies to table is change_request and Queries from table is rm_story).
  3. Open the record and look at the Query with script. Update it to query your new custom field:
    javascript
     
    Copy Code
    (function refineQuery(current, parent) {
        // Replace 'u_your_custom_change_field' with the actual backend name of your new field
        current.addQuery('u_your_custom_change_field', parent.sys_id);
    })(current, parent);
  4. Save. Your stories will now populate in that existing related list.

Scenario B: It is an M2M Table If the related list is driven by a Many-to-Many table (e.g., m2m_story_change), populating a reference field on the Story form won't automatically create the required M2M linking record.

  • The Fix: You would need to create an After (Insert/Update) Business Rule on the rm_story table. When your custom Change Request field changes, the script must automatically insert or update a record in that M2M table to sync the data.

An Alternative (and easier) Approach

If modifying the existing setup proves too complex or interferes with other plugins, the cleanest ServiceNow administrative trick is to simply use your new related list, but rename it to look OOB.

  1. Go to Configure > Related Lists on the Change Request form.
  2. Remove the old "Stories" list and add your new one (it will likely be named something like Story -> Change Request).
  3. Save the form.
  4. Scroll down to your new related list, right-click any column header in the list, and select Configure > List Control.
  5. In the List Control record, change the Label to simply read Stories.

 

Let me know if this works for you! If it does, please consider marking this answer as the Accepted Solution.