Bug 17296

Summary: Failed to correctly configure AnonymousPatron with AnonSuggestions should display a warning in about
Product: Koha Reporter: Miguel Tuimil <miguel.tuimil>
Component: OPACAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: f.demians, jonathan.druart, julian.maurice, kyle, veron
Version: unspecified   
Hardware: PC   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Bug Depends on: 14655    
Bug Blocks:    
Attachments: Bug 17296: Display warning if AnonymousPatron is not correctly set
Bug 17296: Display warning if AnonymousPatron is not correctly set
[PASSED QA] Bug 17296: Display warning if AnonymousPatron is not correctly set

Description Miguel Tuimil 2016-09-13 14:38:41 UTC
If the preference AnonSuggestions is changed to Allow and AnonymousPatron is left in default (0), when an unauthenticated patron send a new purchase suggestion using the form (opac-suggestions.pl?op=add) appear:

Software error:

DBIx::Class::ResultSet::create(): Column 'suggestedby' cannot be null at /usr/share/koha/lib/C4/Suggestions.pm line 457
Comment 1 Jonathan Druart 2016-09-14 12:39:12 UTC
It's a configuration issue, you should get a warning in the about page, but something is buggy.
Patch is coming.
Comment 2 Jonathan Druart 2016-09-14 12:45:06 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2016-09-14 13:16:48 UTC
Created attachment 55555 [details] [review]
Bug 17296: Display warning if AnonymousPatron is not correctly set

Bug 14655 added a warning to the about page ("System information" tab)
if the AnonymousPatron feature is not correctly configured.
But actually there is one case when it's not displayed.

Test plan:
Set AnonymousPatron to a non existing patron
Set at least 1 borrowers.privacy == 2
go on the about page.
Without this patch you do not get the warning
With this patch you will see "Some patrons have requested a privacy on
returning item but the AnonymousPatron pref is not set correctly. Set it
to a valid borrower number if you want that this feature works
correctly."

Signed-off-by: Marc <veron@veron.ch>
Comment 4 Katrin Fischer 2016-09-18 12:36:36 UTC
Created attachment 55653 [details] [review]
[PASSED QA] Bug 17296: Display warning if AnonymousPatron is not correctly set

Bug 14655 added a warning to the about page ("System information" tab)
if the AnonymousPatron feature is not correctly configured.
But actually there is one case when it's not displayed.

Test plan:
Set AnonymousPatron to a non existing patron
Set at least 1 borrowers.privacy == 2
go on the about page.
Without this patch you do not get the warning
With this patch you will see "Some patrons have requested a privacy on
returning item but the AnonymousPatron pref is not set correctly. Set it
to a valid borrower number if you want that this feature works
correctly."

Signed-off-by: Marc <veron@veron.ch>

Signed-off-by: Katrin Fischer  <katrin.fischer@bsz-bw.de>
Comment 5 Kyle M Hall 2016-09-27 11:09:08 UTC
Pushed to master for 16.11, thanks Jonathan!
Comment 6 Frédéric Demians 2016-09-30 08:39:22 UTC
Pushed in 16.05. Will be in 16.05.05.
Comment 7 Julian Maurice 2016-10-14 11:55:30 UTC
Pushed to 3.22.x, will be in 3.22.12