How to create database view to get all incidents whose comments are not updated since 3 days ?

Snehal13
Kilo Sage

How to create database view to get all incidents whose comments are not updated since 3 days ?

Joining sys_journal_field table and incident table is fine but how to set the offset of X days in database view ?

 

Anyone has tried this approach and got the result as mentioned above ?

Note - I have a working approach of  running a query BR on above mentioned tables and getting the expected result BUT want to check if a database view can satisfy the requirement without the need of a business rule

 

 

6 REPLIES 6

J Siva
Kilo Patron

Hi @Snehal13 
It's not possible to acheive your requirement using Database views.

Regards,
Siva

Ankur Bawiskar
Tera Patron

@Snehal13 

I won't suggest using sys_journal_field which is a system table in database view due to performance

if your requirement is to show incidents where no comments added since 3 days then 2 approaches below:

Approach 1: create a date/time field which is custom and everytime comment is added then update it with current date/time. This field you can use in report filter conditions

Approach 2: this link has approach with metric

Report to show tickets where additional comments not updates in x number of days

Also check these links

https://community.servicenow.com/community?id=community_blog&sys_id=37c045cadbcf409023f4a345ca961921

https://community.servicenow.com/community?id=community_blog&sys_id=0740de96dbcf889023f4a345ca96195d

If my response helped please mark it correct and close the thread so that it benefits future readers

@Snehal13 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.

@Snehal13 

Hope you are doing good.

Did my reply answer your question?

If my response helped please mark it correct and close the thread so that it benefits future readers.