link request task to change request

osvaldo2
Kilo Contributor

Has anyone been able to link a request tasks to a change request similar as showing in this steps. Link changes to a project task   I am able to see it creates a change from the task but I cant get the task to show up linked on the change request?

1 ACCEPTED SOLUTION

Thats great.. You found it. But it is referencing the Catalog Task instead of Change Request or Task table, while you in the script you are trying to store the change request. Something is wrong with the way it is implemented.



You   also need to correct this line in the script.


link.eislinked_task = changeRequest.insert();



It should be


link.u_eis_linked_task = changeRequest.insert();



Please mark this response as correct or helpful if it assisted you with your question.

View solution in original post

29 REPLIES 29

if I add parent I get the following:



find_real_file.png



But I am not seeing a eislinked_task anywhere


Strange..


Because this line link.eislinked_task = changeRequest.insert(); should copy the change request number to eislinked_task in table u_eis_task_link. You may need to create this field if it doesnt exists.



    var link = new GlideRecord("u_eis_task_link");


    link.initialize();


  link.parent = current.sys_id;



    var changeRequest = new GlideRecord("change_request");


    changeRequest.short_description = current.short_description;


    link.eislinked_task = changeRequest.insert();


    new EISTaskLinkUtils().copyChangeInfoToLink(link, changeRequest);


    link.insert();



Please mark this response as correct or helpful if it assisted you with your question.

it is strange, if I go to the table related to the task



find_real_file.png




I do see the dictionary item there:


find_real_file.png


Thats great.. You found it. But it is referencing the Catalog Task instead of Change Request or Task table, while you in the script you are trying to store the change request. Something is wrong with the way it is implemented.



You   also need to correct this line in the script.


link.eislinked_task = changeRequest.insert();



It should be


link.u_eis_linked_task = changeRequest.insert();



Please mark this response as correct or helpful if it assisted you with your question.

thanks let me try your suggestions. I will update the thread if it worked.