Bug 22363

Summary: Move C4::Logs::GetLogs to Koha namespace
Product: Koha Reporter: Josef Moravec <josef.moravec>
Component: Architecture, internals, and plumbingAssignee: Josef Moravec <josef.moravec>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: martin.renvoize, nick
Version: unspecified   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Medium patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.05.00
Bug Depends on:    
Bug Blocks: 20750, 22069, 23632, 25893    
Attachments: Bug 22363: Add Koha::ActionLog[s] objects
Bug 22363: Add tests
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs
Bug 22363: Add Koha::ActionLog[s] objects
Bug 22363: Add tests
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs
Bug 22363: (follow-up) Fix pod
Bug 22363: Add Koha::ActionLog[s] objects
Bug 22363: Add tests
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs
Bug 22363: (follow-up) Fix pod
Bug 22363: Add Koha::ActionLog[s] objects
Bug 22363: Add tests
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs
Bug 22363: (follow-up) Fix pod

Description Josef Moravec 2019-02-18 13:57:04 UTC

    
Comment 1 Josef Moravec 2019-02-18 16:25:38 UTC
Created attachment 85248 [details] [review]
Bug 22363: Add Koha::ActionLog[s] objects
Comment 2 Josef Moravec 2019-02-18 16:25:41 UTC
Created attachment 85249 [details] [review]
Bug 22363: Add tests
Comment 3 Josef Moravec 2019-02-18 16:25:44 UTC
Created attachment 85250 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t
Comment 4 Josef Moravec 2019-02-18 17:11:36 UTC
Created attachment 85253 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t
Comment 5 Josef Moravec 2019-02-18 17:12:24 UTC
Created attachment 85254 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t
Comment 6 Josef Moravec 2019-02-18 20:35:14 UTC
Created attachment 85261 [details] [review]
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs

Test plan:
prove t/db_dependent/Circulation.t
Comment 7 Andrew Isherwood 2019-02-19 10:01:52 UTC
Hi Josef - This test failure appears to be unrelated to your work, if you agree I'm happy to sign off your patches.

koha-koha@aidev:~/kohaclone$ prove t/db_dependent/Circulation.t
t/db_dependent/Circulation.t .. 28/124 Reducing fine for item 104734 borrower 4329 from 3.5 to 2 - MaxFine reached at /home/koha-koha/kohaclone/C4/Overdues.pm line 570.
Use of uninitialized value $actionname in concatenation (.) or string at /home/koha-koha/kohaclone/C4/Log.pm line 85.
Reducing fine for item 104734 borrower 4329 from 3.5 to 2 - MaxFine reached at /home/koha-koha/kohaclone/C4/Overdues.pm line 570.
Use of uninitialized value $actionname in concatenation (.) or string at /home/koha-koha/kohaclone/C4/Log.pm line 85.

#   Failed test at t/db_dependent/Circulation.t line 494.
#          got: '1'
#     expected: '2'
Can't call method "accounttype" on an undefined value at t/db_dependent/Circulation.t line 496.
# Looks like your test exited with 2 just after 41.
t/db_dependent/Circulation.t .. Dubious, test returned 2 (wstat 512, 0x200)
Failed 84/124 subtests 

Test Summary Report
-------------------
t/db_dependent/Circulation.t (Wstat: 512 Tests: 41 Failed: 1)
  Failed test:  40
  Non-zero exit status: 2
  Parse errors: Bad plan.  You planned 124 tests but ran 41.
Files=1, Tests=41, 11 wallclock secs ( 0.03 usr  0.02 sys +  7.98 cusr  0.32 csys =  8.35 CPU)
Result: FAIL
Comment 8 Josef Moravec 2019-02-19 10:11:02 UTC
(In reply to Andrew Isherwood from comment #7)
> Hi Josef - This test failure appears to be unrelated to your work, if you
> agree I'm happy to sign off your patches.
> 
> koha-koha@aidev:~/kohaclone$ prove t/db_dependent/Circulation.t
> t/db_dependent/Circulation.t .. 28/124 Reducing fine for item 104734
> borrower 4329 from 3.5 to 2 - MaxFine reached at
> /home/koha-koha/kohaclone/C4/Overdues.pm line 570.
> Use of uninitialized value $actionname in concatenation (.) or string at
> /home/koha-koha/kohaclone/C4/Log.pm line 85.
> Reducing fine for item 104734 borrower 4329 from 3.5 to 2 - MaxFine reached
> at /home/koha-koha/kohaclone/C4/Overdues.pm line 570.
> Use of uninitialized value $actionname in concatenation (.) or string at
> /home/koha-koha/kohaclone/C4/Log.pm line 85.
> 
> #   Failed test at t/db_dependent/Circulation.t line 494.
> #          got: '1'
> #     expected: '2'
> Can't call method "accounttype" on an undefined value at
> t/db_dependent/Circulation.t line 496.
> # Looks like your test exited with 2 just after 41.
> t/db_dependent/Circulation.t .. Dubious, test returned 2 (wstat 512, 0x200)
> Failed 84/124 subtests 
> 
> Test Summary Report
> -------------------
> t/db_dependent/Circulation.t (Wstat: 512 Tests: 41 Failed: 1)
>   Failed test:  40
>   Non-zero exit status: 2
>   Parse errors: Bad plan.  You planned 124 tests but ran 41.
> Files=1, Tests=41, 11 wallclock secs ( 0.03 usr  0.02 sys +  7.98 cusr  0.32
> csys =  8.35 CPU)
> Result: FAIL

Hm, this one is not related with my patches, but yesterday I had it all green, I'll try it again, but it may be caused by some data problem? Just guessing....
Comment 9 Andrew Isherwood 2019-02-25 08:51:31 UTC
Created attachment 85594 [details] [review]
Bug 22363: Add Koha::ActionLog[s] objects

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Comment 10 Andrew Isherwood 2019-02-25 08:51:34 UTC
Created attachment 85595 [details] [review]
Bug 22363: Add tests

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Comment 11 Andrew Isherwood 2019-02-25 08:51:37 UTC
Created attachment 85596 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Comment 12 Andrew Isherwood 2019-02-25 08:51:40 UTC
Created attachment 85597 [details] [review]
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs

Test plan:
prove t/db_dependent/Circulation.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>
Comment 13 Josef Moravec 2019-02-25 12:00:37 UTC
(In reply to Andrew Isherwood from comment #12)
> 
> Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Thanks for testing Andrew!
Comment 14 Josef Moravec 2019-02-25 18:14:54 UTC
Created attachment 85632 [details] [review]
Bug 22363: (follow-up) Fix pod
Comment 15 Katrin Fischer 2019-02-25 18:21:56 UTC
Created attachment 85633 [details] [review]
Bug 22363: Add Koha::ActionLog[s] objects

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 16 Katrin Fischer 2019-02-25 18:22:00 UTC
Created attachment 85634 [details] [review]
Bug 22363: Add tests

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 17 Katrin Fischer 2019-02-25 18:22:03 UTC
Created attachment 85635 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 18 Katrin Fischer 2019-02-25 18:22:07 UTC
Created attachment 85636 [details] [review]
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs

Test plan:
prove t/db_dependent/Circulation.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 19 Katrin Fischer 2019-02-25 18:22:11 UTC
Created attachment 85637 [details] [review]
Bug 22363: (follow-up) Fix pod

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 20 Josef Moravec 2019-02-26 20:21:11 UTC
Created attachment 85749 [details] [review]
Bug 22363: Add Koha::ActionLog[s] objects

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 21 Josef Moravec 2019-02-26 20:21:16 UTC
Created attachment 85750 [details] [review]
Bug 22363: Add tests

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 22 Josef Moravec 2019-02-26 20:21:22 UTC
Created attachment 85751 [details] [review]
Bug 22363: Use Koha::ActionLogs->search instead of GetLogs in log viewer

Test plan:
1) Use log viewer, try different parameters
2) Try screen and file export
3) prove t/db_dependent/Koha/ActionLogs.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 23 Josef Moravec 2019-02-26 20:21:29 UTC
Created attachment 85752 [details] [review]
Bug 22363: Update Circulation.t to use Koha::ActionLogs instead of GetLogs

Test plan:
prove t/db_dependent/Circulation.t

Signed-off-by: Andrew Isherwood <andrew.isherwood@ptfs-europe.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 24 Josef Moravec 2019-02-26 20:21:36 UTC
Created attachment 85753 [details] [review]
Bug 22363: (follow-up) Fix pod

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 25 Josef Moravec 2019-02-26 20:24:07 UTC
Rebased needed because of bug 21206
Comment 26 Nick Clemens 2019-03-11 13:12:50 UTC
Awesome work all!

Pushed to master for 19.05
Comment 27 Martin Renvoize 2019-03-12 09:25:09 UTC
Enhancement will not be backported to 18.11.x series.