The child-parent relationship is designed to be multiple to multiple. However, for some business needs, you may need to restrict this so that one child ticket can have at most one parent ticket. This tech doc provides the solution for this purpose.
How to prevent a child ticket have more than one parent ticket?
Service Desk Manager/CMDB 12.9, 14.1 and 17.1 on windows/unix/linux
Following these steps to implement this solution:
- Copy update_lrel.js file from the default location to the modification location in
<SD-install-dir>\site\mods\www\wwwroot\scripts (for windows) or <SD-install-dir>/site/mods/www/wwwroot/scripts( for Unix/Linux)
- Use a text editor to open the update_lrel.js file in the modification location and search for "function update_child"
and within this function add this line
extra += "KEEP.where_clause=parent is NULL";
before this line
update_with_lrel_style(parent_factory, parent_persid, factory, qrel_name, lable1, label2, "", extra);
and save and close.
- From command prompt, run
pdm_webcache -H and pdm_webcache -b