Creating Epics & Stories from Demand with more fields?

Uncle Rob
Kilo Patron

OOB it looks like Epics and Stories don't inherit much from the Demand (short description only as far as I can tell).
I'd like to inherit a lot more, including assignment group, description, and some of the dates.

 

The CreateEpic UI Action calls this function from AgileDemandConversionUtil

The function seems to be open to a parameter called preFields, however the UI Action calling it never sends it as a parameter.

 

RobertFedoruk_2-1725971707674.png

 

Has anyone successfully added more fields to the Epic/Story output from a Demand?
If so, how much did you have to mess with OOB code?

 

3 REPLIES 3

Bhavisha Keshwa
Tera Contributor

Hi Rob,

 

Yes this actually works very well.

I wanted to pass some fields to be copied at story level from demand as well, I used the below code:

 

function convertToStory() {
    var prefields=[
{"fieldName": "description", "fieldValue": current.description} ,
{"fieldName": "top_portfolio", "fieldValue": current.portfolio}
];
    var agileDemandConversion = new AgileDemandConversion();
    agileDemandConversion.convertDemandAndUpdateReferenceField(current,prefields);
    action.setRedirectURL(current);
}
 
Hope this helps.

Alex Karas
ServiceNow Employee

For anyone who might be looking at this solution in the future, I'd have to point out that there is a table called CSM Table Map (csm_table_map) - that is not a Customer Service Management future BTW but a platform feature.

There are is one entry OOTB for stories and one for epics (Demand to Story & Demand to Epic) that are utilized by the script includes invoked when you click the "Create Epic" or "Create Story" UI actions on the demand.

Example of the Demand to Story record:

AlexKaras_0-1767102401594.png
Any field you need to map, you can add it here. As you see in my example, I mapped the demand's description with the story's description and the demand's assignment group field with the story's assignment group field so these fields are transferred as well.

You can see the OOTB definition of the mapping btw expressed in the script field itself (that could be used btw for more advanced mapping needs if a direct field-to-field mapping is not enough).

 

mnkntkota
Tera Contributor
Hi @Alex Karas, I couldn’t find the CSM Roadmaps table in my instance. Do we need the CSM plugins to be installed?