Attachments being added to incidents creates comments in the activity

Brian Lancaster
Tera Sage

We have noticed that when you add an attachment to an incident is causes comments with a link to the attachment to appear.  We would like to change this to worker notes.  We disabled the Business rule that calls that script include AttachmentAuditTrailHelper but the attachment is still appearing in the comments so it does not appear to be this script include causing the comments to be created.  Anybody have any idea on what makes these updates?

11 REPLIES 11

That is going to remove all the attachments.  I just want to hide the ones they did not create.

Hello Bricast,

Like I said in my post, that block is what is responsible for adding the attachment, you can control the conditions in the ng-if rather than commenting out from there.

Since you want to remove the attachment all together including the box, Probably makes more sense to remove it at the ng-repeat level.

To do this you will need to add 1 line of code, and edit another:

 

Here is the text to paste:  data.user_id = gs.getUserID();

find_real_file.png

 

Here is the condition to paste into the ng-repeat: 

Do a Ctrl+F and find

ng-repeat="e 

Then add this to attribute to the HTML:

ng-if="e.element == 'attachment' && e.user_sys_id == data.user_id || e.element != 'attachment'"

find_real_file.png

 

Best,

Andrew

Brian Lancaster
Tera Sage

I was able to end up doing this easier by putting a condition on one of the OOB ACL on the attachment table to only run if the table name is not incident and then creating an ACL specifically for when the table name is incident.

What was the ACL you updated?

Hi  @kevinclarke ,

 

How did you fix this ?