Bug 26950 - Checkin failure messages are unclear or too specific
Summary: Checkin failure messages are unclear or too specific
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Nick Clemens
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-11-06 12:32 UTC by Nick Clemens
Modified: 2021-01-18 14:40 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: String patch
Text to go in the release notes:
Version(s) released in:
21.05.00


Attachments
Bug 26950: Make Anonymous patron warnings 'errors' and refer to the system information tab on about.pl (7.60 KB, patch)
2020-11-06 12:44 UTC, Nick Clemens
Details | Diff | Splinter Review
Bug 26950: Make Anonymous patron warnings 'errors' and refer to the system information tab on about.pl (7.70 KB, patch)
2020-11-09 08:13 UTC, Fridolin Somers
Details | Diff | Splinter Review
Bug 26950: Make Anonymous patron warnings 'errors' and refer to the system information tab on about.pl (7.76 KB, patch)
2021-01-11 13:44 UTC, Martin Renvoize
Details | Diff | Splinter Review
Bug 26950: Fix SIP/Message.t (2.21 KB, patch)
2021-01-13 16:15 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 Nick Clemens 2020-11-06 12:32:31 UTC
Currently checkins can fail for one of two known reasons:
1 - Duplicate issue ids
2 - Anonymous borrower configuration issues

In the first case we refer to the 'data problems' or 'data corrupted' section of the about page. All errors are on the 'System information' tab and this is what we should mention

In the second case we refer to the data problems section, but information is in another section on the tab. Additionally, during checkin we issue an 'Error' but on the about page we call it a 'Warning' we should upgrade to error and specify what is broken
Comment 1 Nick Clemens 2020-11-06 12:44:34 UTC Comment hidden (obsolete)
Comment 2 Fridolin Somers 2020-11-09 08:03:45 UTC
Testing it.

>  2 - Set anonymousborrower to '0'
Syspref is 'AnonymousPatron', I will change it on signoff
Comment 3 Fridolin Somers 2020-11-09 08:13:06 UTC
Created attachment 113300 [details] [review]
Bug 26950: Make Anonymous patron warnings 'errors' and refer to the system information tab on about.pl

Currently checkins can fail for one of two known reasons:
1 - Duplicate issue ids
2 - Anonymous borrower configuration issues

In the first case we refer to the 'data problems' or 'data corrupted' section of the about page. All errors are on the 'System information' tab and this is what we should mention

In the second case we refer to the data problems section, but information is in another section on the tab. Additionally, during checkin we issue an 'Error' but on the about page we call it a 'Warning' we should upgrade to error and specify what is broken

Additionally this patch fixes the warning that should display while issuing to a patron if anonymous is not set and patron has selected privacy

To test:
 1 - Enable system preference OPACPrivacy
 2 - Set system preference AnonymousPatron to '0'
 3 - Log in a a patron on OPAC and set your privacy to never
 4 - Issue a book to that patron in the staff client
 5 - Note there is no warning
 6 - Return the book
 7 - Note the circulation page displays an error and the checkin fails and refers to 'data problems'
 8 - Apply patch
 9 - Issue another book to patron
10 - Note warning on the circulation page
11 - Try to check in a book again
12 - Check the new message makes sense
13 - Click the link to 'about.pl' check that errors are displayed
14 - Check the logs
15 - Confirm updated error message makes sense

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Comment 4 Martin Renvoize 2021-01-11 13:44:09 UTC
Created attachment 115028 [details] [review]
Bug 26950: Make Anonymous patron warnings 'errors' and refer to the system information tab on about.pl

Currently checkins can fail for one of two known reasons:
1 - Duplicate issue ids
2 - Anonymous borrower configuration issues

In the first case we refer to the 'data problems' or 'data corrupted' section of the about page. All errors are on the 'System information' tab and this is what we should mention

In the second case we refer to the data problems section, but information is in another section on the tab. Additionally, during checkin we issue an 'Error' but on the about page we call it a 'Warning' we should upgrade to error and specify what is broken

Additionally this patch fixes the warning that should display while issuing to a patron if anonymous is not set and patron has selected privacy

To test:
 1 - Enable system preference OPACPrivacy
 2 - Set system preference AnonymousPatron to '0'
 3 - Log in a a patron on OPAC and set your privacy to never
 4 - Issue a book to that patron in the staff client
 5 - Note there is no warning
 6 - Return the book
 7 - Note the circulation page displays an error and the checkin fails and refers to 'data problems'
 8 - Apply patch
 9 - Issue another book to patron
10 - Note warning on the circulation page
11 - Try to check in a book again
12 - Check the new message makes sense
13 - Click the link to 'about.pl' check that errors are displayed
14 - Check the logs
15 - Confirm updated error message makes sense

Signed-off-by: Fridolin Somers <fridolin.somers@biblibre.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 5 Martin Renvoize 2021-01-11 13:44:34 UTC
Trivial improvement... Passing QA
Comment 6 Jonathan Druart 2021-01-12 15:48:12 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 7 Jonathan Druart 2021-01-13 16:15:03 UTC
Created attachment 115116 [details] [review]
Bug 26950: Fix SIP/Message.t

t/db_dependent/SIP/Message.t .. 2/9
    #   Failed test 'DBIx error on duplicate issue_id'
    #   at t/db_dependent/SIP/Message.t line 643.
    # found warning: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::mysql::st execute failed: Duplicate entry '1' for key 'PRIMARY' [for Statement "INSERT INTO `old_issues` ( `auto_renew`, `auto_renew_error`, `borrowernumber`, `branchcode`, `date_due`, `issue_id`, `issuedate`, `issuer_id`, `itemnumber`, `lastreneweddate`, `note`, `notedate`, `noteseen`, `onsite_checkout`, `renewals`, `returndate`, `timestamp`, `unseen_renewals`) VALUES ( ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ? )" with ParamValues: 0=0, 1=undef, 2=57, 3='m_HHGh', 4=undef, 5=1, 6=undef, 7=undef, 8=973, 9=undef, 10=undef, 11=undef, 12=undef, 13=0, 14=0, 15='2021-01-14 16:12:47', 16='2021-01-13 16:12:48', 17=0] at /kohadevbox/koha/Koha/Object.pm line 169
    # found carped warning: The checkin for the following issue failed, Please go to the about page and check all messages on the 'System information' to see if there are configuration / data issues (Duplicate ID)$VAR1 = {
    # expected to find warning: (?^u:Duplicate entry)
    # expected to find warning: (?^u:data corrupted)
    # Looks like you failed 1 test of 35.
Comment 8 Jonathan Druart 2021-01-13 16:20:16 UTC
Last patch pushed to master.
Comment 9 Fridolin Somers 2021-01-18 14:40:32 UTC
Enhancement not pushed to 20.11.x