Last active
September 7, 2019 02:56
-
-
Save iaindooley/531239aac98711c8b56b75fd86fa7593 to your computer and use it in GitHub Desktop.
Full audit trail
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fullAuditTrail(notification) | |
{ | |
var notif = new Notification(notification); | |
var card = notif.card(); | |
try | |
{ | |
var sheet = SpreadsheetApp.openByUrl(card.attachment("Full Audit Trail").link()).getSheetByName("Actions Log"); | |
} | |
catch(e) | |
{ | |
Notification.expectException(InvalidDataException,e); | |
var file = SpreadsheetApp.create("Full Audit Trail "+card.id()); | |
card.attachLink({link: file.getUrl(),name: "Full Audit Trail"}); | |
var sheet = file.insertSheet("Actions Log"); | |
} | |
sheet.appendRow([Trellinator.now(),notif.member().name(),notif.notification.action.display.translationKey,JSON.stringify(notif.notification.action.display.entities)]); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment