• Home
  • Demo
  • Buy Now
RISE - Ultimate Project Manager & CRM
    RISE - Ultimate Project Manager & CRMInstallation & MaintenancePersonalizationSettingsClient ManagementAI AssistantInvoices & PaymentsProjects & TasksTeam & CollaborationProductivity ToolsSales & ServicesRISE ReportsPluginsFAQChange logs
Mailbox PluginLanding Page Builder PluginEasy Backup PluginSquare Payment Method PluginLogin as Client PluginAsset Management Plugin2 Factor Authentication PluginPassword Manager PluginSocial Login PluginGoogle Meet Integration PluginSpreadsheets PluginZoom Integration PluginAuto Attendance PluginWhiteboards PluginDocs PluginBlog Manager PluginWhatsApp Link PluginMicrosoft Teams Integration PluginProperty Management PluginTelegram Notification PluginAWS S3 Integration PluginWhatsApp Notification PluginWasabi Integration PluginBackblaze Integration PluginCloudflare R2 Integration PluginDigitalOcean Spaces Integration PluginAdyen Payment Method PluginbKash Payment Method Pluginiyzico Payment Method PluginJazzCash Payment Method PluginMercado Pago Payment Method PluginMidtrans Payment Method PluginMontonio Payment Method PluginN-Genius Payment Method PluginNagad Payment Method PluginPayFast Payment Method PluginPaysera Payment Method PluginPaystack Payment Method PluginPix Payment Method PluginRazorpay Payment Method PluginRocket Payment Method PluginSSLCommerz Payment Method Plugin
  1. Docs
  2. RISE - Ultimate Project Manager & CRM
  3. Plugins

Add a plugin table to the activity logs

RISE keeps an activity log (life cycle) of clients, leads, invoices, estimates, proposals, contracts, orders, subscriptions, tickets and expenses. A plugin can add its own tables to these logs with one filter.

What is logged

  • created, updated and deleted records. Updates are logged only when an important field changes.
  • sent: an invoice, estimate, proposal or contract was emailed. The log keeps the email log id and the ids of the client contacts who got the email (no email addresses).
  • notified: a notification was sent for a record without another log (like reminders or a client opening a proposal).
  • Draft invoices, estimates, proposals, contracts and subscriptions: only created, deleted and the change out of draft are logged. Edits and item changes of a draft are not logged.

Logs are saved automatically by ci_save(), delete() and delete_permanently() of the models. Saving costs one small query, only when an important field changes. If a log can't be saved, the error is written to the log file and the saving action goes on.

Add a table from a plugin

Your model must extend Crud_model and save with ci_save(). Add the table with the filter app_filter_activity_log_tracked_tables. Use the table name without the prefix.

app_hooks()->add_filter('app_filter_activity_log_tracked_tables', function ($tables) {
    //a main record of a client
    $tables["my_plugin_bookings"] = array(
        "log_type" => "my_plugin_booking",
        "title_fields" => array("title"),
        "client_field" => "client_id",
        "fields" => array("title", "status", "booking_date", "client_id"),
        "created_fields" => array("status")
    );

    //a sub record of an invoice
    $tables["my_plugin_invoice_notes"] = array(
        "log_type" => "my_plugin_invoice_note",
        "title_fields" => array("title"),
        "parent" => "invoices",
        "parent_field" => "invoice_id",
        "fields" => array("title", "description")
    );

    return $tables;
});

Options

OptionMeaning
log_typeName of the record type (a-z, 0-9, _, max 30 characters). Use your plugin name in it.
title_fieldsFields used as the title of the log. The first one with a value is used.
client_fieldField with the client id. The log is shown in the client's history.
parent, parent_fieldFor sub records: the parent table and the field with the parent id. The client of the parent is saved too.
fieldsChanges of these fields are logged. Other fields (like sort or totals) are ignored.
created_fieldsValues saved with the created log.
draft_statusStatus value of a draft (like "draft"). Edits of a draft are not logged.
sent_fieldA date field set when the record is emailed (like last_email_sent_date). A change of it is logged as sent.
summary_fieldsBig fields (like html content). The log only says that it changed.
conditionFunction($row) returning false to skip a row.
skip_changeFunction($field, $from, $to) returning true to skip a change.
actor_fieldField with the user who created the row. Used when nobody is signed in (like a cron job).

Automatic changes

Logs are saved with the signed in user. When your plugin changes records automatically after a user's action (like creating an invoice after a client's order), run that code as the app, so the logs show the system instead of the user:

\App\Libraries\Activity_log_tracker::run_as_app(function () use ($order_id) {
    //your automatic changes
});

Where the logs are shown

Logs of a main record with a client_field are shown in the Activity section of the client page. Logs of a sub record of invoices, estimates, proposals, contracts, orders, subscriptions or tickets are shown on that record's page too. Logs of plugin tables are shown only to admins, because RISE can't check their permissions.

Notifications

When you call log_notification() after saving a tracked record in the same request, the notification is linked to the log automatically (activity_log_id).

Was this article helpful? Yes No
How can we improve this article?
© 2026 Fairsketch
Home Get Support Buy Now

Delete?

Are you sure? You won't be able to undo this action!
To do