time worked Related list issue with Problems

siddhi sawant
Tera Contributor

we have same fields on incident and problem table. When I try to create a problem from the incident table using the create problem UI action, all data is copied except for the time worked related list data. Any suggestion ?

 

siddhisawant_1-1713857945775.png

 

 Time worked records not showing on problem table

siddhisawant_0-1713857909039.png

 

4 REPLIES 4

Community Alums
Not applicable

Hi @siddhi sawant ,

I checked you query in my PDI and I got to know that time worked field will not copy bcoz in UI Action it is calling the script include called - IncidentUtilsSNC and here only some fields are mentioned like - 

description,short_description,cmdb_ci,impact,urgency,priority,company,sys_domain,business_service,service_offering
 
All this fields I bolded they were get updated in Problem other fields will not update 
Here is image of UI Action 
SarthakKashya2_1-1713860531451.png

 

Please mark my answer correct and helpful if this works for you

 

Thanks and Regards 

Sarthak

 

 
SarthakKashya2_0-1713860451145.png

 

Hi @Community Alums  Thank you for the response,  I have mapped all the fields in UI action. I have only issue with time worked related list

 

siddhisawant_0-1713861440807.png

 

Community Alums
Not applicable

Hi @siddhi sawant ,

Can you please try to convert it glideDate time Or try to do like this

prob.setValue('time_worked', current.time_worked);
 
Please mark my answer correct and helpful if this works for you
 
Thanks and Regards 
Sarthak

swathisarang98
Giga Sage
Giga Sage

Hi @siddhi sawant ,

 

As i can see Time worked is captured in a different table so each row is a record in 'task_time_worked' table so you cannot copy it from incident to problem as copy paste because it's not a field.

 

so if you want it then you have to query and get the data from incident (time worked) and create new records in task_time_worked table with 'Task' as your problem, you should make your code dynamic.

 

Note: Time worked captures the user and the time they have worked for each table so by default incident will capture only the time taken by user or any one who worked on that particular incident similarly for the Problem table.

 

Please mark this comment as Correct Answer/Helpful if it helped you.

Regards,

Swathi Sarang