Description
Tomás Cohen Arazi (tcohen)
2016-06-28 22:13:38 UTC
Created attachment 53060 [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 Created attachment 53061 [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 Created attachment 53062 [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 Created attachment 53063 [details] [review] Bug 16829: DBIx update Sponsored-by: NEKLS Created attachment 53064 [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 Created attachment 53199 [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> Created attachment 53200 [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> Created attachment 53201 [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> Created attachment 53202 [details] [review] Bug 16829: DBIx update Sponsored-by: NEKLS Signed-off-by: Nicole C Engard <nengard@bywatersolutions.com> Created attachment 53203 [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> Tomás, don't you think we should try and fill the interface column for existing values? (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. > This should go to a separate bug IMHO.
I agree, it would make more sense as a separate bug and patch.
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> 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> 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> 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> 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> Pushed to master for 16.11, thanks Tomas! |