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

Pedro Amorim (ammopt) <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|Passed QA                   |Failed QA

--- Comment #119 from Pedro Amorim (ammopt) <[email protected]> ---
Hi all, taken a look, found a few issues worth fixing before push:

Finding 1: the backfill fails on a deleted library
1) Check out '39999000003154' to any patron at
http://localhost:8081/cgi-bin/koha/circ/circulation.pl, then check it in at
http://localhost:8081/cgi-bin/koha/circ/returns.pl
2) In the KTD shell:
koha-mysql kohadev <<'EOF'
DROP TABLE checkins;
UPDATE old_issues SET branchcode='GONE', checkin_library='GONE';
EOF
updatedatabase
3) The output shows 'ERROR: Broken FK constraint', and checkins is empty
4) Clean up:
koha-mysql kohadev -e "UPDATE old_issues SET branchcode='CPL',
checkin_library='CPL'"
updatedatabase

Finding 2: the backfill stores checkout data as checkin data. Normal checkins
record both correctly, it's only the backfill.
1) Set 'RecordStaffUserOnCheckout' to 'Record' at
http://localhost:8081/cgi-bin/koha/admin/preferences.pl?op=search&searchfield=RecordStaffUserOnCheckout
2) Create a staff patron at
http://localhost:8081/cgi-bin/koha/members/memberentry.pl?op=add_form&categorycode=S
   - 'Card number' and 'Username' = 'staffb', 'Password' = 'Staffb1234'
   - Under 'More' > 'Set permissions', give them 'catalogue', 'circulate' and
'loggedinlibrary'
3) As 'koha', check out '39999000003154' to any patron
4) Log in as 'staffb', use 'Set library' to switch to 'Fairview', and check
'39999000003154' in
5) In the KTD shell, check the record created by the checkin. It's correct:
staffb's borrowernumber and 'FFL':
koha-mysql kohadev -e "SELECT user_id, library_id FROM checkins WHERE
checkout_id=(SELECT MAX(issue_id) FROM old_issues)"
6) Then rebuild the table using only the backfill (clearing checkin_library
simulates a pre bug 33641 / 24.11 return):
koha-mysql kohadev <<'EOF'
DROP TABLE checkins;
UPDATE old_issues SET checkin_library=NULL;
EOF
updatedatabase
koha-mysql kohadev -e "SELECT user_id, library_id FROM checkins WHERE
checkout_id=(SELECT MAX(issue_id) FROM old_issues)"
7) It shows user_id 51 ('koha', who checked it out) and 'CPL' (where it was
checked out). user_id should be NULL, and the library shouldn't be guessed from
the checkout.

Finding 3: CI failure:
In kohastructure.sql, checkins sits between cash_registers and categories. It
needs to go between categories_branches and checkout_renewals, otherwise the DB
compare job (misc4dev run_tests.pl --compare-with) fails: it diffs
kohastructure.sql against an alphabetical dump of the upgraded DB.

-- 
You are receiving this mail because:
You are watching all bug changes.
_______________________________________________
Koha-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]
website : http://www.koha-community.org/
git : http://git.koha-community.org/
bugs : http://bugs.koha-community.org/

Reply via email to