Incident notes from Pager Duty do not display in Activities (filtered)

willa
Giga Contributor

I recently implemented Pager Duty's bi-directional integration with ServiceNow. Everything works as expected except for one thing that I have not been able to figure out. When a note is added to an incident in PagerDuty there is a scripted UI action that imports those notes from PagerDuty into the incident work notes. It does correctly import the notes and insert them into the work notes of the incident but those notes do not show up in the Activities (filtered) field on the incident form. If I add the 'Comments and Work Notes' field to the form, all of the work notes do display there. I can also see them from the work notes tool-tip from the list view.

I have confirmed all the filters are selected for the Activities field, messed around with User Preferences, confirmed that the Activity Formatter includes work notes, and confirmed sys property 'glide.ui.incident_activity.fields' includes work_notes and comments_and_work_notes. There are other work notes from PagerDuty that do show up in the activity but they also come in through a scripted processor while the notes that are missing are actually being imported from the PagerDuty API into an import set and then a transform map script is actually doing the work to update the incident work_notes.

It's got me stumped as to why some show but other don't. Any suggestions are appreciated!! Thanks!

1 ACCEPTED SOLUTION

willa
Giga Contributor

I did eventually find a fix for this issue. The PagerDuty application for ServiceNow includes a Note Import Service which uses a transform map to update the incident notes. 'Run Business Rules' for this transform map was not check and after checking it notes are imported and show in the work notes activity field fine. I haven't done a lot of testing with it but it seems to work fine. Just wanted to provide an answer to my own question here in case any one else runs into this issue.


View solution in original post

6 REPLIES 6

rajeevlochan82
Mega Guru

Hi William,



Couple of things you may check. Check entry in sys_audit table for the missing notes/work notes. The activity formatter displays value from this table thought the data also reside in sys_journal table. So looks like data is getting fine to sys_journal table but not to sys_audit table. Please verify if these entries are going to sys_audit table as well. If not then formatter will not display these values in form view.



find_real_file.png



Thanks,


Rajeev



PS : Like , Helpful based on Response


Thanks, Rajeev! That does appear to be the issue. I do not see records of those work note changes in the sys_audit table. I found this post which listed a scheduled script to run to update these records but when I run that script the logs indicate "GlideHistorySet is not allowed in scoped applications". Is it because it is a scoped application that those work_note updates don't make it in the sys_audit table in the first place? I manually added a record to the sys_audit table and also applied the PagerDuty app role to my account as well as the guest account. The ones that are not showing in Activities (filtered) are actually updated under my account but other notes from PagerDuty come up under guest. I am also working with PagerDuty support on this but if you have other suggestions on how to make this work, I am all ears! Thanks again!


At this point I have no idea why its failing. I wish I had the application to test it our and provide some recommendation.



Thanks,


Rajeev


Thanks for your help! If nothing else, at least I learned a little bit about journal fields and auditing. I'll be sure to respond if I find the solution.



And FYI, the PagerDuty integration app is available from the ServiceNow Store for free. Obviously you would need a PagerDuty account to test the full integration but installing the app would at least give you an idea of how their integration works from the ServiceNow side.