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

            Bug ID: 25159
           Summary: Action logs should be stored in JSON ( and as a diff
                    of the change )
 Change sponsored?: ---
           Product: Koha
           Version: master
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P5 - low
         Component: Tools
          Assignee: [email protected]
          Reporter: [email protected]
        QA Contact: [email protected]

Action logs would be much more readable if we changed the format from a raw
Data::Dumper::Dumper string to JSON which we could format nicely in the
interface.

In addition, we could store changes to database rows ( and other data
structures ) as a diff stored in JSON. I think the format from
Struct::Diff::diff is nice.

Given:
my $x = {
    surname => 'Hall',
    firstname => 'Kyle',
    cardnumber => '12345',
    suffix => "Jr.",
};

my $y = {
    surname => 'Hall',
    firstname => 'Kyle',
    cardnumber => '9876543',
    nickname => "K-dog"
};

The diff looks like:

{
  "D": {
    "cardnumber": {
      "N": "9876543"
    },
    "nickname": {
      "A": "K-dog"
    },
    "suffix": {
      "R": "Jr."
    }
  }
}

Where the D key is the difference, and indicates cardnumber has changed with an
N, nickname has been added with an A, and suffix has been removed with an R.

With this data we can easily construct a nice diff view ( perhaps green for
added, red for removed, and yellow for changes showing the old and new value ).

-- 
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