Bug 16934 - Cannot add notes to canceled and deleted order line
Summary: Cannot add notes to canceled and deleted order line
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Acquisitions (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Kyle M Hall
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 11:01 UTC by Kyle M Hall
Modified: 2017-12-07 22:16 UTC (History)
4 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:


Attachments
Bug 16934 - Cannot add notes to canceled and deleted order line (1.40 KB, patch)
2016-07-18 11:03 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 16934 - Cannot add notes to canceled and deleted order line (1.45 KB, patch)
2016-07-20 20:11 UTC, Claire Gravely
Details | Diff | Splinter Review
Bug 16934 - Cannot add notes to canceled and deleted order line (1.52 KB, patch)
2016-07-21 17:24 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 16934: Add test for ModOrder (1.31 KB, patch)
2016-07-21 17:24 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 Kyle M Hall 2016-07-18 11:01:19 UTC
Some librarians would like to be able to add notes to deleted order lines to keep track of data such as what title the order line was for. For some reason ModOrder dies if a biblionumber is passed in, even though it does not use biblionumber and does not need it to exist in any fashion! This limitation should be removed.
Comment 1 Kyle M Hall 2016-07-18 11:03:54 UTC Comment hidden (obsolete)
Comment 2 Aleisha Amohia 2016-07-19 05:19:24 UTC
I may be doing something wrong, but once I've cancelled an order, the line goes grey and the option to add a note etc. is gone.
Comment 3 Claire Gravely 2016-07-19 10:28:09 UTC
I had the same issue as Aleisha, was about to give it another go in case I was doing something odd.
Comment 4 Kyle M Hall 2016-07-20 14:59:02 UTC
My bad, the test plan should be:

Test Plan:
1) Create a basket with an orderline
2) Delete the record
3) Click the "Add internal note" link for that order line
4) Fill in a note and click "Save"
5) Note the error
6) Apply this patch
7) Repeat steps 3-4
8) Note this time the note is saved!

The situation arises when the record is deleted but the order is not canceled.

I also wonder why we are preventing librarian's from adding notes to a canceled order. It seems like a useful feature. Outside the scope of this bug report though. Once this bug is fixed I'll probably submit a new enhancement for that.
Comment 5 Claire Gravely 2016-07-20 20:11:19 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-07-21 17:24:02 UTC
Created attachment 53598 [details] [review]
Bug 16934 - Cannot add notes to canceled and deleted order line

Some librarians would like to be able to add notes to deleted order
lines to keep track of data such as what title the order line was for.
For some reason ModOrder dies if a biblionumber is passed in, even
though it does not use biblionumber and does not need it to exist in any
fashion! This limitation should be removed.

Test Plan:
1) Create a basket with an orderline
2) Cancel the order / delete the record
3) Click the "Add internal note" link for that order line
4) Fill in a note and click "Save"
5) Note the error
6) Apply this patch
7) Repeat steps 3-4
8) Note this time the note is saved!

Signed-off-by: Claire Gravely <c.gravely@arts.ac.uk>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 7 Jonathan Druart 2016-07-21 17:24:24 UTC
Created attachment 53599 [details] [review]
Bug 16934: Add test for ModOrder

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 8 Kyle M Hall 2016-07-22 17:13:17 UTC
Pushed to master for 16.11, thanks for the followup Jonathan!
Comment 9 Frédéric Demians 2016-08-01 13:45:12 UTC
Pushed in 16.05. Will be in 16.05.02.
Comment 10 Julian Maurice 2016-08-17 11:47:50 UTC
Patches pushed to 3.22.x, will be in 3.22.10