Bug 16829 - action_logs should have an 'interface' column
Summary: action_logs should have an 'interface' column
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Transaction logs (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Tomás Cohen Arazi
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 14642
  Show dependency treegraph
 
Reported: 2016-06-28 22:13 UTC by Tomás Cohen Arazi
Modified: 2017-12-07 22:18 UTC (History)
5 users (show)

See Also:
Change sponsored?: Sponsored
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 16829: Add 'interface' column to action_logs (2.62 KB, patch)
2016-07-03 23:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16829: make logaction and GetLogs aware of the interface column (2.65 KB, patch)
2016-07-03 23:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16829: Add 'interface' to the log viewer (5.29 KB, patch)
2016-07-03 23:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16829: DBIx update (1.42 KB, patch)
2016-07-03 23:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16829: Unit tests for logaction's 'interface parameter' (3.76 KB, patch)
2016-07-03 23:48 UTC, Tomás Cohen Arazi
Details | Diff | Splinter Review
Bug 16829: Add 'interface' column to action_logs (2.68 KB, patch)
2016-07-07 19:19 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16829: make logaction and GetLogs aware of the interface column (2.71 KB, patch)
2016-07-07 19:19 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16829: Add 'interface' to the log viewer (5.35 KB, patch)
2016-07-07 19:19 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16829: DBIx update (1.49 KB, patch)
2016-07-07 19:19 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16829: Unit tests for logaction's 'interface parameter' (3.82 KB, patch)
2016-07-07 19:19 UTC, Nicole C. Engard
Details | Diff | Splinter Review
Bug 16829: Add 'interface' column to action_logs (2.75 KB, patch)
2016-08-11 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16829: make logaction and GetLogs aware of the interface column (2.81 KB, patch)
2016-08-11 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16829: Add 'interface' to the log viewer (5.46 KB, patch)
2016-08-11 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16829: DBIx update (1.56 KB, patch)
2016-08-11 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16829: Unit tests for logaction's 'interface parameter' (3.89 KB, patch)
2016-08-11 10:28 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Tomás Cohen Arazi 2016-06-28 22:13:38 UTC
This will be handy for further developments.
Comment 1 Tomás Cohen Arazi 2016-07-03 23:48:27 UTC Comment hidden (obsolete)
Comment 2 Tomás Cohen Arazi 2016-07-03 23:48:30 UTC Comment hidden (obsolete)
Comment 3 Tomás Cohen Arazi 2016-07-03 23:48:34 UTC Comment hidden (obsolete)
Comment 4 Tomás Cohen Arazi 2016-07-03 23:48:36 UTC Comment hidden (obsolete)
Comment 5 Tomás Cohen Arazi 2016-07-03 23:48:39 UTC Comment hidden (obsolete)
Comment 6 Nicole C. Engard 2016-07-07 19:19:25 UTC Comment hidden (obsolete)
Comment 7 Nicole C. Engard 2016-07-07 19:19:30 UTC Comment hidden (obsolete)
Comment 8 Nicole C. Engard 2016-07-07 19:19:33 UTC Comment hidden (obsolete)
Comment 9 Nicole C. Engard 2016-07-07 19:19:37 UTC Comment hidden (obsolete)
Comment 10 Nicole C. Engard 2016-07-07 19:19:41 UTC Comment hidden (obsolete)
Comment 11 Jonathan Druart 2016-08-02 12:07:57 UTC
Tomás, don't you think we should try and fill the interface column for existing values?
Comment 12 Tomás Cohen Arazi 2016-08-09 19:20:31 UTC
(In reply to Jonathan Druart from comment #11)
> Tomás, don't you think we should try and fill the interface column for
> existing values?

It could be done. I'm wondering how can we determine the source of the log. For example regarding holds, or renewals. We should (maybe) have a cli script that can be run anytime t ofix previous logs.

This should go to a separate bug IMHO.
Comment 13 Kyle M Hall 2016-08-10 13:33:27 UTC
> This should go to a separate bug IMHO.

I agree, it would make more sense as a separate bug and patch.
Comment 14 Jonathan Druart 2016-08-11 10:28:08 UTC
Created attachment 54294 [details] [review]
Bug 16829: Add 'interface' column to action_logs

This patch introduces a new column for the action_logs table. It is
called 'interface' and it is intended to store the interface in which
the action was performed.

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2016-08-11 10:28:12 UTC
Created attachment 54295 [details] [review]
Bug 16829: make logaction and GetLogs aware of the interface column

This patch changes the logaction API so it accepts a new 'interface' param.
Current code calling logaction is not changed, and this parameter can be ommited
in most contexts, and it will correctly fall-back to C4::Context->interface.

Unit tests are provided on a different patch.

GetLogs gets patched as well, so it can be required to filter by 'interface' param.

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2016-08-11 10:28:16 UTC
Created attachment 54296 [details] [review]
Bug 16829: Add 'interface' to the log viewer

This patch introduces the 'interface' filter to the log viewer.

To test:
- Apply the patch
- Open the log viewer
=> SUCCESS: As default, 'All' interfaces are chosen. OPAC, Intranet and SIP are presented
- Do a lot of log searches, verify that the interface column shows what is expected.
=> SUCCESS: The chosen 'interfaces' are kept when rendering results.

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Jonathan Druart 2016-08-11 10:28:19 UTC
Created attachment 54297 [details] [review]
Bug 16829: DBIx update

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 18 Jonathan Druart 2016-08-11 10:28:23 UTC
Created attachment 54298 [details] [review]
Bug 16829: Unit tests for logaction's 'interface parameter'

This patch introduces tests for the new 'interface' parameter for the
C4::Log::logaction and C4::Log::GetLogs functions.

In logaction, it falls back to C4::Context->interface if ommited.

To test:
- Run
  $ prove t/db_dependent/Log.t
=> SUCCESS: Tests pass
- Sign off

Sponsored-by: NEKLS

Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 19 Kyle M Hall 2016-08-17 18:09:45 UTC
Pushed to master for 16.11, thanks Tomas!