Autoclose Knowledge Feedback tasks

kumar junior11
Tera Contributor

When a KB Feedback Task has been in the Resolved State for more than 2 Days (48 Hours), it should be automatically moved to the Closed state. help me  with the best solution.

 

 

thanks in advance,

regards

saikumar

16 REPLIES 16

Hi @kumar junior11,

 

I've just realized why this won't work for you. You'll notice within the script (on line 13) there is a condition within the query to check the 'u_resolved_at' date time. This is a custom field. 

Incident, Problem and Customer Service Case records have this field out of the box. Weirdly there is no similar field at 'Task' level or other table levels, hence why it was created on the instance I was working on to capture this data point.

 

The question here is - how do you know when this Feedback Task was moved to Resolved? How do you record this in your instance? Are you recording it?

We could dig into the sys_audit table however this is generally not recommended - hence why a new field was created.

 

You'll either need to create this field and then retrospectively go back and update existing records, and for new records moved to Resolved moving forward, make sure this new u_resolved_at field is populated so it can be leveraged in this script.

 

Does this make sense?

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

 

Thanks, Robbie

@Robbie 

kalalisaikumar_0-1716304339931.png

there is kft's metric which shows start and end date for resolved, new, in progress 

 

Hi @kumar junior11,

 

Great - Thanks for confirming that @kumar junior11. You can use this Metric to leverage and check against the 'Resolved' start date in the Script.

 

To help others (or for me to help you more directly), please mark this response correct by clicking on Accept as Solution and/or Kudos.

 

Thanks, Robbie

@Robbie  can you help me how can i add these metric into the code, like which field i need to use, 

@Robbie the scheduled job which you sent has worked , it closed the kft task which are resolved, but it doesnt calculated the time difference, it closed kft tasks irrespective of no of days it stayed in resolved state . it closed the tasks which stayed in resolved for less than a day