Skip to content

Add user filter to license logging and extend DEVLicenseLogCleanup to cover DEVLicenseTablesUsers#14

Open
Copilot wants to merge 5 commits intomasterfrom
copilot/improve-license-usage-log-utility
Open

Add user filter to license logging and extend DEVLicenseLogCleanup to cover DEVLicenseTablesUsers#14
Copilot wants to merge 5 commits intomasterfrom
copilot/improve-license-usage-log-utility

Conversation

Copy link

Copilot AI commented Mar 13, 2026

Two enhancements to the DEVLicense usage logging infrastructure.

User filter parameter (SysIntParameters.DEVLicenseUtils)

New DEVLicenseUserFilter field (NotesLine) on SysIntParameters. When populated, only users whose ID is a substring of this value are logged — empty means log everyone.

Filter is enforced in both logging paths:

  • DEVLicenseElementUsageLogMonitor.insertLogRecord (element usage log)
  • DEVLicenseElementUsageLogMonitor.logWrite (write operations / DEVLicenseTablesUsers)
str userFilter = SysIntParameters::Find().DEVLicenseUserFilter;
if (userFilter && !strContains(userFilter, curUserId()))
{
    return;
}

DEVLicenseTablesUsers cleanup (DEVLicenseLogCleanup)

DEVLicenseLogCleanup.run now handles DEVLicenseTablesUsers alongside the existing DEVLicenseElementUsageLog:

  • Delete mode — removes rows older than keepDays by CreatedDateTime
  • Compact mode — deduplicates by (UserId, TableName, Source, AOTName), retaining only the latest RecId per group

💬 Send tasks to Copilot coding agent from Slack and Teams to turn conversations into code. Copilot posts an update in your thread when it's finished.

Co-authored-by: TrudAX <26786918+TrudAX@users.noreply.github.com>
Copilot AI changed the title [WIP] Improve data modification logging for license usage log utility License usage log: add form-level data modification logging Mar 13, 2026
Copilot AI requested a review from TrudAX March 13, 2026 10:15
…SecurableType fields

Co-authored-by: TrudAX <26786918+TrudAX@users.noreply.github.com>
Copilot AI changed the title License usage log: add form-level data modification logging License usage log: real-time write operation logging via form datasource events Mar 13, 2026
…; use DEVLicenseTablesUsers in DEVLicenseReportCalc

Co-authored-by: TrudAX <26786918+TrudAX@users.noreply.github.com>
Copilot AI changed the title License usage log: real-time write operation logging via form datasource events Consolidate real-time write logging into DEVLicenseElementUsageLogMonitor; include DEVLicenseTablesUsers in report calc Mar 13, 2026
@TrudAX TrudAX marked this pull request as ready for review March 13, 2026 11:28
Copilot AI review requested due to automatic review settings March 13, 2026 11:28
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR consolidates real-time write-event logging by absorbing DEVLicenseWriteMonitor and DEVLicenseWriteLogHandler into DEVLicenseElementUsageLogMonitor, and adds DEVLicenseTablesUsers real-time write data to the license report calculation.

Changes:

  • Moved write-event subscriber, datasource handlers (onDsInserted/onDsUpdated/onDsDeleted), and logWrite into DEVLicenseElementUsageLogMonitor with a new usedWriteSet static field for session-level deduplication
  • Added a new DEVLicenseCaptureWriteLog parameter field to SysIntParameters and new AOTName/SecurableType fields to DEVLicenseTablesUsers
  • Added a second population pass in DEVLicenseReportCalc.processLicenseElementUsageLogLine to include DEVLicenseTablesUsers rows with RealTime* sources in license entitlement resolution

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.

File Description
DEVLicenseElementUsageLogMonitor.xml Absorbs write-event logic: new usedWriteSet field, form subscriber, DS event handlers, and logWrite method
DEVLicenseReportCalc.xml Adds query over DEVLicenseTablesUsers for RealTime* sources to feed license report user lines
DEVLicenseTablesUsers.xml Adds AOTName and SecurableType fields and field group entries
SysIntParameters.DEVLicenseUtils.xml Adds DEVLicenseCaptureWriteLog parameter field

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +299 to +303
str usageKey = strFmt('%1|%2|%3|%4',
tablesUsers.UserId,
tablesUsers.TableName,
tablesUsers.Source,
tablesUsers.AOTName);
…leanup in DEVLicenseLogCleanup

Co-authored-by: TrudAX <26786918+TrudAX@users.noreply.github.com>
Copilot AI changed the title Consolidate real-time write logging into DEVLicenseElementUsageLogMonitor; include DEVLicenseTablesUsers in report calc Add user filter to license logging and extend DEVLicenseLogCleanup to cover DEVLicenseTablesUsers Mar 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants