Bug 13731 - Suggestions reason doesn't save
Summary: Suggestions reason doesn't save
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low major
Assignee: Jonathan Druart
QA Contact: Testopia
URL:
Keywords:
Depends on: 12627
Blocks:
  Show dependency treegraph
 
Reported: 2015-02-19 11:20 UTC by Josef Moravec
Modified: 2015-12-03 22:02 UTC (History)
5 users (show)

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


Attachments
Bug 13731: Suggestions reason does not save on updating the status (1.60 KB, patch)
2015-02-23 11:36 UTC, Jonathan Druart
Details | Diff | Splinter Review
[Signed-off] Bug 13731: Suggestions reason does not save on updating the status (1.77 KB, patch)
2015-02-24 13:54 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 13731: Suggestions reason does not save on updating the status (1.85 KB, patch)
2015-03-02 11:34 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 Josef Moravec 2015-02-19 11:20:01 UTC
When you, as librarian make decisions about purchase suggestions, you can choose one of the SUGGEST authorized value, which describes, why do you decide this way. But, unfortunetely, this reason isn't presented anywhere, it looks like it isn't saved into database either...
Comment 1 Owen Leonard 2015-02-19 16:50:00 UTC
When viewing accepted suggestions in the staff client you should see a "status" column which includes the reason which was specified when the suggestion was accepted. The information is stored in the "reason" column in the suggestions table.

Are you not seeing it like that, or are you expecting it to display somewhere else?
Comment 2 Josef Moravec 2015-02-20 07:56:28 UTC
I can't see it anywhere... and in the database, in table suggestions, i have just NULL value in column reason in every row.
Comment 3 Katrin Fischer 2015-02-22 09:22:32 UTC
Hi Owen and Josef,

I just tested this after some weirdness seen in training. I can confirm the problem: It's not really a display problem, but if you accept/reject a suggestion right now, the reason doesn't seem to get saved into the suggestion at all :(
Comment 4 Katrin Fischer 2015-02-22 11:47:00 UTC
I did a git bisect as I couldn't spot the problem right away, it points to:

1c2744a83f99027386f9409ad43e725707ae45f8 is the first bad commit
commit 1c2744a83f99027386f9409ad43e725707ae45f8
Author: Yohann Dufour <dufour.yohann@gmail.com>
Date:   Fri Aug 8 15:11:18 2014 +0200

    Bug 12627: SQLHelper replacement - C4::Suggestions
Comment 5 Katrin Fischer 2015-02-22 12:14:42 UTC
... I fail to spot the problem, could someone else please take a look?
Comment 6 Jonathan Druart 2015-02-23 11:36:09 UTC Comment hidden (obsolete)
Comment 7 Marc Véron 2015-02-24 13:54:54 UTC Comment hidden (obsolete)
Comment 8 Katrin Fischer 2015-03-02 11:34:20 UTC
Created attachment 36281 [details] [review]
[PASSED QA] Bug 13731: Suggestions reason does not save on updating the status

On the suggestion list view, if you set a status, it won't be saved.

Test plan:
1/ Create a suggestion
2/ Go on the suggestion list view (suggestion/suggestion.pl)
3/ Select a suggestion and marked it as "rejected" (or the status you
want) and choose a reason
4/ Save
5/ Browse you suggestions DB table (using your favorite MySQL CLI) and
verify that the "reason" field is correctly filled.

Works as expected.
Signed-off-by: Marc Véron <veron@veron.ch>

Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de>
Works as expected, thx!
Comment 9 Tomás Cohen Arazi (tcohen) 2015-03-02 15:44:11 UTC
Patch pushed to master.

Thanks Jonathan!
Comment 10 Chris Cormack 2015-03-12 07:14:59 UTC
Pushed to 3.18.x will be in 3.18.5
Comment 11 Mason James 2015-03-26 02:30:47 UTC
Possible selection for 3.16.x
Comment 12 Mason James 2015-03-26 02:35:27 UTC
(In reply to Mason James from comment #11)
> Possible selection for 3.16.x

bug does not exist in 3.16.9 - so skipping patch