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

            Bug ID: 41358
           Summary: action logs info column should always store JSON
   Initiative type: ---
        Sponsorship ---
            status:
           Product: Koha
           Version: Main
          Hardware: All
                OS: All
            Status: NEW
          Severity: normal
          Priority: P5 - low
         Component: Circulation
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]
                CC: [email protected], [email protected]

In C4/Circulation.pm:

            # Log the checkout
            if ( C4::Context->preference('IssueLog') ) {
                my $info = $item_object->itemnumber;
                if ( defined($confirmations) || defined($forced) ) {
                    $info = to_json(
                        {
                            issue         => $issue->issue_id,
                            branchcode    => $issue->branchcode,
                            itemnumber    => $item_object->itemnumber,
                            confirmations => $confirmations,
                            forced        => $forced
                        },   
                        { pretty => 1, canonical => 1 }
                    );   
                }    
                logaction(
                    "CIRCULATION", "ISSUE",
                    $patron->borrowernumber,
                    $info,
                );   
            }  


It appears there is a way, if $forced and $confirmations is undef, to store
just the itemnumber. 

If we are going to store JSON it should always be JSON. Storing the itemnumber
sometimes and a JSON object other times makes reporting really hard.

-- 
You are receiving this mail because:
You are watching all bug changes.
You are the assignee for the bug.
_______________________________________________
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