Bug 6880 - Reason for suggestions do not save
Summary: Reason for suggestions do not save
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: master
Hardware: All All
: PATCH-Sent (DO NOT USE) critical (vote)
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
: 6856 (view as bug list)
Depends on:
Blocks: 6070
  Show dependency treegraph
Reported: 2011-09-18 21:13 UTC by Katrin Fischer
Modified: 2019-06-27 09:24 UTC (History)
3 users (show)

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

Proposed fix (2.29 KB, patch)
2011-10-26 18:20 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 6880- Reason for suggestions do not save (2.58 KB, patch)
2011-10-26 22:33 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 2011-09-18 21:13:26 UTC
On master you can add a reason for suggestion in OPAC and in acquisitions when creating a suggestion.
This value is not saved into the database.
Comment 1 Paul Poulain 2011-10-26 15:36:38 UTC
mmm... just checked on 3.6.0 and it works fine for me. Anything in the logs ?
Comment 2 Katrin Fischer 2011-10-26 15:49:25 UTC
Retesting now...
Comment 3 Katrin Fischer 2011-10-26 15:55:45 UTC
I can still reproduce this.

1) Create suggestion in OPAC
2) Fill out title and select a reason from the pull down field 
3) Check suggestion in database and in acq - reason is not saved or shown

Error logs show no errors.
Comment 4 Paul Poulain 2011-10-26 16:04:21 UTC
well, I just tried by selecting a suggestion or entering one manually, and it worked fine.
I also tried by creating a suggestion from both OPAC and staff.

Do you have an error in your logs ?
Comment 5 Katrin Fischer 2011-10-26 16:25:23 UTC
Feature was implemented as Bug 1883. 
I am not sure where the patron reason should save to - there is suggestions.reason - but perhaps this should only be used for accept/reject reaosns from staff? That way the patron reason would not be overwritten.
Comment 6 Owen Leonard 2011-10-26 16:48:03 UTC
My guess is that when working on Bug 1883 I modified my database to add a "patronreason" column to the suggestions table. With that in place the feature works. I'll submit a follow-up which makes the table modification.
Comment 7 Owen Leonard 2011-10-26 18:20:30 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2011-10-26 22:33:12 UTC
Created attachment 6068 [details] [review]
[SIGNED-OFF] Bug 6880- Reason for suggestions do not save

The fix for Bug 1883 seems to have lacked the necessary
update to the database to add the "patronreason" column
to the suggestions table. This patch does so.

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Patch adds database update and change to kohastructure.
After this patch is applied, the patron's reason for
making a suggestion (form in opac) is saved to the database
correctly. The reason is also shown in the detail view
of the suggestion.

This needs to be backported to 3.6
Comment 9 Katrin Fischer 2011-10-29 15:17:21 UTC
*** Bug 6856 has been marked as a duplicate of this bug. ***
Comment 10 Marcel de Rooy 2011-11-23 15:23:32 UTC
QA Comment:
Code looks good. Patch passed QA.

Some developers may have the column already somehow, but will not be troubled by the SQL error if an update tries to add it again. (This could have been checked [very] theoretically.)
In the print statement in updatedatabase the bug report number could be mentioned for more information. The whole update procedure is under change now and I suspect that this patch therefore will be on hold until the new system is in place. (Effectively creating the need for a rebase..)
Comment 11 Katrin Fischer 2011-11-23 15:35:37 UTC
Or will be applied to 3.6 and require a new patch for master... thx for QA Marcel, we will wait and find out.
Comment 12 Paul Poulain 2011-12-27 16:15:29 UTC
patch pushed, please test

(DB rev
Comment 13 Jared Camins-Esakov 2012-12-31 00:27:46 UTC
There have been no further reports of problems so I am marking this bug resolved.