The Zurich release has arrived! Interested in new features and functionalities? Click here for more

Is there a way to copy related items (CI relationships) from one CI to another CI?

humblecommitted
Kilo Guru

Hello Community,

I was wondering if there was a way of copying related CI items from one CI to another. i.e.

Take CI related items from one CI:

find_real_file.png

and copy it to another CI:

find_real_file.png

I would hate to have to replicate these relationships manually:

find_real_file.png

Thanks for your help in advance.

1 ACCEPTED SOLUTION

humblecommitted
Kilo Guru

So it looks like i had to hack it for now.



I had to do a source code injection.



Steps:


open up the relationship items for the table that has all the CI relationships configured all ready.



right click the relationship table to inspect the element.


find_real_file.png


copy the "select id" of the table with the CIs (it should contain the sys_id's of the CI items were trying to copy).


find_real_file.png


paste the string into a code editor in preparation to paste into another ci:


find_real_file.png


Open another CI that you would like to copy the related CI items to:


find_real_file.png


right click on the "select id" segment like in the previous CI and paste the code we copied from the editor here:


find_real_file.png


find_real_file.png


find_real_file.png


Click on one of the items to make the "Apply" button live and register all the updated data that was inputted:


find_real_file.png


And "BAM" easy copied solution for related CIs from one CI to another.


find_real_file.png


View solution in original post

8 REPLIES 8

I will test it out and let you know jake.



Thank you.


Hello Jake,



would you be so kind as to guide me (and the community) as to where this code will be scripted?  



Would it be in the ui action tab?


Rahul Kathuria
Tera Expert

If you want to bulk upload the Cmdb relationships you can use import set transform map functionality.




Thanks


Rahul Kathuria


Hello Rahul,



Do you know the procedure in order to do so?