Hi Johnv,
the macro 'Add Activity Log - SLA expired' calls the function 'log_event' to create the activity log record, but that function obviously does not have an option to flag the log entry as internal. You could use function 'generic_activity_log' instead:generic_activity_log - which has as its last argument the option to set the 'internal' flag. However, neither of those functions allows you to update a custom field on the activity log record.
For your specific example, to capture the analyst when a violation is recorded - in a custom field 'zAnalyst' perhaps - I would be inclined to add a trigger. Something like this ought to do it. This will capture the 'zAnalyst' field for every EVT activity log created, which may be excessive. You might want to test in the function whether the activity log description starts with "AHD63013", and only update 'zAnalyst' if that is so.
I haven't tested this function myself, so be prepared to do some debugging.
zAlg_triggers.mod:
MODIFY alg POST_VALIDATE zCaptureAnalyst() 9999 FILTER( type == "EVT" ) ;
zCaptureAnalyst.spl:
alg::zCaptureAnalyst(...)
{
string method;
method = "alg::zCaptureAnalyst";
logf(SIGNIFICANT, "%s, started", method);
uuid curr_zAnalyst;
curr_zAnalyst = this.zAnalyst;
if (is_empty(curr_zAnalyst))
{
// No assignee recorded yet in the activity log. Capture it from the ticket.
uuid theAnalyst;
// Look up the assignee for the ticket to which the activity log belongs.
theAnalyst = (uuid)expand(format("&{'%s' = cr.persid->assignee}", this.call_req_id));
this.zAnalyst = theAnalyst;
logf(SIGNIFICANT, "%s, updated zAnalyst", method);
}
logf(SIGNIFICANT, "%s, finished", method);
}
Let me know how it goes if you decide to take this approach.
Regards,
James