Update RITM State when Catalog Task is Updated

Marques2
Tera Expert

Hello All!

I have a requirement that has to be met where a RITM state has to be updated once ONE of the catalog task states moves from Open to Work in Progress. How can this be accomplished? Currently, when I put one of the Catalog Tasks in a Work in Progress state, the RITM state remains in a Pending state. However, for the initial Go-Live release, RITMs will not have group ownership- Each team will solely be responsible for their Task that's tied to that RITM.

Again, how can the RITM state move from Pending to Work in Progress once a Catalog Task moves from Open to Work in Progress?

Similar to how Catalog Tasks move to Closed Complete and the RITM and REQ are updated

Please reach out with any questions that you have!

Thank you all!

-Marques

12 REPLIES 12

Glad I could help you. Mark any of the response as correct and close the thread


tanumoy
Tera Guru

After Business rule on sc_task table for the first requirement.



var gr = new GlideRecord('sc_task');


gr.addQuery('request_item',current.request_item);


gr.addQuery('state', 5); // assuming the value of work in progress in sc_task table is 5


gr.query();



if(gr.next())


{


var parent = new GlideRecord('sc_req_item');


parent.addQuery('sys_id', current.request_item);


parent.addQuery('state', 4); //assuming the value of pending in sc_req_item table is 4


parent.query();



if(parent.next())


{


parent.state = 6; // assuming the value of work in progress in sc_req_item table is 6


parent.update()


}


}


Marques2
Tera Expert

Thank you all!!



I will be checking into this later this afternoon and will be sure to mark anyone helpful who made this possible for me. I appreciate it!



-Marques