How do I restrict certain tables to not be selected when creating a project baseline?

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-17-2025 06:40 AM
Hi Community,
I have been looking into the Baseline (planned_task_baseline) functionality and I wanted to ask how would I go about restricting some of the (planned_task) tables to be picked up when I generate a project baseline.
When a new project baseline gets created, the baseline items which get generated can be any planned tasks where the top_task is the project we generate the baseline of.
For example we would not want to have the following task type baseline items: enhancements, stories, releases. What's the best way to implement that?
I understand that "create_baseline" UI Page https://[instance].service-now.com/nav_to.do?uri=sys_ui_page.do?sys_id=a20e3ee0c0a80a6c525bcee03866d... is the one driving the behaviour, with the following lines from the
//schedule baseline to be created if checked..
if(enable_task_baseline == "true" ){
var tasks = new GlideRecord("planned_task");
tasks.addQuery("top_task", task_id);
tasks.query();
while (tasks.next()) {
var baseItem = new GlideRecord("planned_task_baseline_item");
baseItem.baseline = baseId;
baseItem.task = tasks.getUniqueValue();
baseItem.start = tasks.start_date;
baseItem.end = tasks.end_date;
baseItem.insert();
}
If you could help with the right code which would allow me to list the tables that would not be included in generating the baseline items, I would very much appreciate it.
Thank you.
Paula