Bug 13329 - Can't make new suggestion with AllowPurchaseSuggestionBranchChoice turned on
Summary: Can't make new suggestion with AllowPurchaseSuggestionBranchChoice turned on
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: master
Hardware: All All
: P5 - low blocker (vote)
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 12627
Blocks:
  Show dependency treegraph
 
Reported: 2014-11-24 06:37 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
5 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13329: Fix create a suggestion at the OPAC (2.90 KB, patch)
2014-11-24 08:58 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13329: Fix create a suggestion at the OPAC (3.09 KB, patch)
2014-11-24 13:46 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 13329: Fix create a suggestion at the OPAC (3.19 KB, patch)
2014-11-24 20:36 UTC, Katrin Fischer
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Katrin Fischer 2014-11-24 06:37:43 UTC
If you try to create a new suggestion from OPAC and AllowPurchaseSuggestionBranchChoice is turned on, it will result in a perl error:

DBIx::Class::Row::new(): No such column 'branch' on Koha::Schema::Result::Suggestion at /home/katrin/kohaclone/C4/Suggestions.pm line 449
Comment 1 Jonathan Druart 2014-11-24 08:58:07 UTC Comment hidden (obsolete)
Comment 2 Marc Véron 2014-11-24 13:46:46 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2014-11-24 20:36:50 UTC
Created attachment 33877 [details] [review]
[PASSED QA] Bug 13329: Fix create a suggestion at the OPAC

The suggestion table does not contain a 'branch' column name.
The script should pass 'branchcode' to C4::Suggestion::NewSuggestion.

Test plan:
0/ Enable the AllowPurchaseSuggestionBranchChoice pref
1/ Create a suggestion at the OPAC should not raise a DBIx::Class error.

I could reproduce the bug.
With patch bug is gone.

Signed-off-by: Marc Véron <veron@veron.ch>
Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as described, thx for the quick fix.
Comment 4 David Cook 2014-11-25 05:14:30 UTC
Yay team! That was lightning fast!
Comment 5 Tomás Cohen Arazi 2014-11-25 18:39:22 UTC
Patch pushed to master.

Thanks Jonathan!