https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=42030

            Bug ID: 42030
           Summary: Add diff support to SUGGESTION action logs
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Transaction logs
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
            Blocks: 37940

The action logging for the SUGGESTION module (Koha/Suggestion.pm) currently
logs CREATE and MODIFY actions without passing the $original parameter to
logaction(). No structured diff is generated in the action_logs.diff column.

The relevant logaction() call is in Koha/Suggestion.pm (~line 79):
  logaction( 'SUGGESTION', $action, $result->suggestionid, $self );

This bug covers updating Koha::Suggestion to capture the pre-change suggestion
state and pass it as the sixth argument to logaction(), enabling before/after
comparison in the action log viewer.

Since Koha::Suggestion is a Koha::Object subclass, $self->get_from_storage (or
an equivalent pre-change snapshot) should be captured before store() and passed
as $original for MODIFY actions. For CREATE, $self can serve as the single
state captured.


Referenced Bugs:

https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=37940
[Bug 37940] [OMNIBUS] All modification logged via action logs should include
original to create JSON diff
-- 
You are receiving this mail because:
You are the assignee for the bug.
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list
[email protected]
https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to