- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 02:13 AM
Hi All,
We use Templates for Standard Changes. I've created a module in the Change application where users can select the template and automatically create a change with the relevant change tasks generated. It's recently been brought to my attention that these are currently no longer working. The tasks are not being generated.
This is true for all templates set up in this way.
They are set up correctly with the first task referenced in the 'Next Related Child Template' field and then the next task contained in the 'Next Related Template' fields within each task.
To my knowledge nothing has changed that would affect this and according to our users was working only a couple of weeks ago.
Any help on troubleshooting this?
Thanks
Paul
Solved! Go to Solution.
- Labels:
-
Change Management
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 03:46 AM
For anyone else experiencing this issue, I raised a ticket with ServiceNow and here was their response (Also a working solution!) :-
The reason why you were affected by this problem only recently is because the problem is affecting only JDK (java libraries) version 1.8, and the JDK version on the instance's nodes was upgraded on the 21.11 by ServiceNow from 1.6 to 1.8.
This problem was closed as Not a Problem, but a lack of documentation:
This is a documentation issue. The problem exists because the child templates are not populating the Link Element field.
In the steps to reproduce, if the Link Element is added to the form and set to Change Request the template will work.
A doc task will be opened to update the change docs appropriately.
Workaround:
===========
The following workaround can be applied:
- Go to sys_template.list
- Filter on table=change_task
- For each one of the record, populate the Link Element field with change_request and save
(You might need to add the Link Element field to the form / list layout)
Since you have a large number of templates only on the change_task table, I would advise you to run the following script in the Scripts - Background:
var gr = new GlideRecord('sys_template');
- gr.addQuery('table', 'change_task');
- gr.query();
while (gr._next()) {
- gs.print(gr.name);
- gr.link_element = 'change_request';
- gr.update();
}
This will update the Link Element field in all the change_task templates to change_request.
Please run it first on a sub-production instance, to see that everything works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-29-2016 10:05 AM
Can you please check if there are orphan change_task records that are getting created. Most likely cause is that the change_task table is missing the parent / change_request field values. Your templates need to be adjusted for this.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-30-2016 01:28 AM
Thanks for the suggestion Aditya, there are no orphan change tasks, they are not being generated at all.
This was previously working fine!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
12-06-2016 03:46 AM
For anyone else experiencing this issue, I raised a ticket with ServiceNow and here was their response (Also a working solution!) :-
The reason why you were affected by this problem only recently is because the problem is affecting only JDK (java libraries) version 1.8, and the JDK version on the instance's nodes was upgraded on the 21.11 by ServiceNow from 1.6 to 1.8.
This problem was closed as Not a Problem, but a lack of documentation:
This is a documentation issue. The problem exists because the child templates are not populating the Link Element field.
In the steps to reproduce, if the Link Element is added to the form and set to Change Request the template will work.
A doc task will be opened to update the change docs appropriately.
Workaround:
===========
The following workaround can be applied:
- Go to sys_template.list
- Filter on table=change_task
- For each one of the record, populate the Link Element field with change_request and save
(You might need to add the Link Element field to the form / list layout)
Since you have a large number of templates only on the change_task table, I would advise you to run the following script in the Scripts - Background:
var gr = new GlideRecord('sys_template');
- gr.addQuery('table', 'change_task');
- gr.query();
while (gr._next()) {
- gs.print(gr.name);
- gr.link_element = 'change_request';
- gr.update();
}
This will update the Link Element field in all the change_task templates to change_request.
Please run it first on a sub-production instance, to see that everything works fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-07-2020 09:48 AM
This still doesn't work, possibly they are deprecating all the link_element and Next Child Record and Next Related Record things because they want you to do it all in workflow and flow designer and stuff within catalog items?