Change description type to "HTML" for stories

Laurent Bierge
Tera Contributor

Hi,

I have a requirement to change the description field type in stories (rm_story) to "HTML".

In earlier version, I saw that "acceptance criteria" was already of type "HTML".

I may be wrong, but I think that description is not typed "HTML" cause it comes from task table and that the type can't be override.

Still, is there a way to change the type of description to "HTML" only for stories ? (maybe with an attribute override ?)

Regards,

Laurent

 

1 ACCEPTED SOLUTION

Sebastian L
Mega Sage

Hi Laurent,

No, not that I am aware of. Instead you can create a custom description field of type HTML and use that for stories. 

It is not recommended to change ootb fields (and yes, description is from Task) 🙂 


Best regards,
Sebastian Laursen

View solution in original post

4 REPLIES 4

Sebastian L
Mega Sage

Hi Laurent,

No, not that I am aware of. Instead you can create a custom description field of type HTML and use that for stories. 

It is not recommended to change ootb fields (and yes, description is from Task) 🙂 


Best regards,
Sebastian Laursen

I have same issue , if i create new custom field , how can i get existing data of description field to newly created HTML field? 

Can you please suggest on this please?

 

// Query the "rm_story" table
var storyGR = new GlideRecord('rm_story');
storyGR.query();

// Loop through each record
while (storyGR.next()) {
  var description = storyGR.getValue('description');
  
  // Generate HTML for the description
  var htmlDescription = '<p>' + description + '</p>'; // Modify the HTML markup as needed
  
  // Set the value of "u_html_description" field - change this field name to whatever you called your new field
  storyGR.setValue('u_html_description', htmlDescription);
  
  // Update the record
  storyGR.update();
}

James-B
Kilo Sage

There is no way to override a fields data type. 

As Sebastian has stated, the best solution here would be to create a new description HTML field on the story table and append the form layout.