Bug 33500

Summary: Failing test for t/db_dependent/Circulation.t when RecordLocalUseOnReturn is set to record
Product: Koha Reporter: Lucas Gass <lucas>
Component: Architecture, internals, and plumbingAssignee: Lucas Gass <lucas>
Status: RESOLVED FIXED QA Contact: Marcel de Rooy <m.de.rooy>
Severity: normal    
Priority: P5 - low CC: m.de.rooy
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.11.00,23.05.02,22.11.08
Bug Depends on:    
Bug Blocks: 16122    
Attachments: Bug 33500: Account for RecordLocalUseOnReturn
Bug 33500: Account for RecordLocalUseOnReturn
Bug 33500: Add tests for RecordLocalUseOnReturn
Bug 33500: Add tests for RecordLocalUseOnReturn
Bug 33500: Add tests for RecordLocalUseOnReturn

Description Lucas Gass 2023-04-11 21:47:12 UTC
To recreate:

-Set the sys pref 'RecordLocalUseOnReturn' to 'record'.
-prove -v /kohadevbox/koha/t/db_dependent/Circulation.t


# Subtest: Tests for BlockReturnOfWithdrawnItems
    1..1
    not ok 1 - Item returned as withdrawn, no other messages

    #   Failed test 'Item returned as withdrawn, no other messages'
    #   at /kohadevbox/koha/t/db_dependent/Circulation.t line 5816.
    #     Structures begin differing at:
    #          $got->[1]{LocalUse} = '1'
    #     $expected->[1]{LocalUse} = Does not exist
    # Looks like you failed 1 test of 1.
not ok 65 - Tests for BlockReturnOfWithdrawnItems
# Subtest: Tests for transfer not in transit

#   Failed test 'Tests for BlockReturnOfWithdrawnItems'
#   at /kohadevbox/koha/t/db_dependent/Circulation.t line 5819.
    1..2
    not ok 1 - Item is reported to have been transferred

    #   Failed test 'Item is reported to have been transferred'
    #   at /kohadevbox/koha/t/db_dependent/Circulation.t line 5837.
    #     Structures begin differing at:
    #          $got->[1]{LocalUse} = '1'
    #     $expected->[1]{LocalUse} = Does not exist
    ok 2 - The datesent field is populated, i.e. transfer is initiated
    # Looks like you failed 1 test of 2.
not ok 66 - Tests for transfer not in transit
Comment 1 Lucas Gass 2023-06-14 15:59:54 UTC
Created attachment 152346 [details] [review]
Bug 33500: Account for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.
Comment 2 Sam Lau 2023-06-14 16:04:15 UTC
Created attachment 152347 [details] [review]
Bug 33500: Account for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 3 Lucas Gass 2023-06-14 17:17:04 UTC
Created attachment 152352 [details] [review]
Bug 33500: Add tests for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.
Comment 4 Sam Lau 2023-06-14 17:57:13 UTC
Created attachment 152355 [details] [review]
Bug 33500: Add tests for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.

Signed-off-by: Sam Lau <samalau@gmail.com>
Comment 5 Marcel de Rooy 2023-06-23 08:06:01 UTC
Filled assignee :)
Comment 6 Marcel de Rooy 2023-06-23 08:31:57 UTC
Created attachment 152623 [details] [review]
Bug 33500: Add tests for RecordLocalUseOnReturn

To test:
1. Turn on RecordLocalUseOnReturn
2. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
3. Tests fail.
4. Apply patch
5. prove -v /kohadevbox/koha/t/db_dependent/Circulation.t
6. Tests pass.

Signed-off-by: Sam Lau <samalau@gmail.com>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 7 Tomás Cohen Arazi 2023-06-23 12:46:06 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 8 Martin Renvoize 2023-07-17 12:45:31 UTC
Thanks for all the hard work!

Pushed to 23.05.x for the next release
Comment 9 Pedro Amorim 2023-07-18 10:50:16 UTC
Nice work everyone!

Pushed to 22.11.x for next release