[Bug 22899] New: Cannot view course details
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Bug ID: 22899 Summary: Cannot view course details Change sponsored?: --- Product: Koha Version: master Hardware: All OS: All Status: NEW Severity: blocker Priority: P5 - low Component: Course reserves Assignee: koha-bugs@lists.koha-community.org Reporter: nick@bywatersolutions.com QA Contact: testopia@bugs.koha-community.org Target Milestone: --- Bug 15505 added a 'pending_hold' column to item-status.inc Course reserves, however, passes item objects to the template and there is no object method for pending_hold To recreate: 1 - Enable course reserves 2 - Create a course 3 - Add an item to the course 4 - Attempt to view the course on the OPAC 5 - Internal Server Error -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |Needs Signoff -- You are receiving this mail because: You are the assignee for the bug. You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #1 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 89706 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89706&action=edit Bug 22899: Add pending_hold method to Koha::Item To test: 1 - Enable course reserves 2 - Create a course 3 - Add an item to the course 4 - Attempt to view the course on the OPAC 5 - Internal Server Error 6 - Apply patch 7 - Add an item to the holds queue by placing a hold and running holds queue builder or: INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###); 8 - View the course page, note item appears 'Pending hold' 9 - Remove the holdsqueue line 10 - View the course page, note item appears 'Available' 11 - prove -v t/db_dependent/Koha/Item.t -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Depends on| |15505 Assignee|koha-bugs@lists.koha-commun |nick@bywatersolutions.com |ity.org | CC| |jonathan.druart@bugs.koha-c | |ommunity.org, | |martin.renvoize@ptfs-europe | |.com Referenced Bugs: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=15505 [Bug 15505] Mark Hold Items 'On hold' instead of 'Available' -- You are receiving this mail because: You are watching all bug changes. You are the assignee for the bug.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89706|0 |1 is obsolete| | --- Comment #2 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 89707 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89707&action=edit Bug 22899: Database update -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #3 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 89708 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89708&action=edit Bug 22899: [DO NOT PUSH] Schema updates -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #4 from Nick Clemens <nick@bywatersolutions.com> --- Created attachment 89709 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89709&action=edit Bug 22899: Add pending_hold method to Koha::Item To test: 1 - Enable course reserves 2 - Create a course 3 - Add an item to the course 4 - Attempt to view the course on the OPAC 5 - Internal Server Error 6 - Apply patch 7 - Add an item to the holds queue by placing a hold and running holds queue builder or: INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###); 8 - View the course page, note item appears 'Pending hold' 9 - Remove the holdsqueue line 10 - View the course page, note item appears 'Available' 11 - prove -v t/db_dependent/Koha/Item.t -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #5 from Jonathan Druart <jonathan.druart@bugs.koha-community.org> --- A couple of small things: 1. The new constraint will not be added if there are itemnumbers in the tmp_holdsqueue that do not exist in items. I know it's unlikely to happen but... who knows? 2. I am expecting ->pending_hold to return a Koha::Hold, maybe ->has_pending_hold could be better? -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Needs Signoff |Signed Off -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Hayley Mapley <hayleymapley@catalyst.net.nz> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89709|0 |1 is obsolete| | --- Comment #6 from Hayley Mapley <hayleymapley@catalyst.net.nz> --- Created attachment 89725 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89725&action=edit Bug 22899: Add pending_hold method to Koha::Item To test: 1 - Enable course reserves 2 - Create a course 3 - Add an item to the course 4 - Attempt to view the course on the OPAC 5 - Internal Server Error 6 - Apply patch 7 - Add an item to the holds queue by placing a hold and running holds queue builder or: INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###); 8 - View the course page, note item appears 'Pending hold' 9 - Remove the holdsqueue line 10 - View the course page, note item appears 'Available' 11 - prove -v t/db_dependent/Koha/Item.t Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> I see Jonathan's comments about small improvements, but will sign off as everything works as expected here. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #7 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Grr.. bit annoyed I missed this whilst QAing bug 15505 :( This patch doesn't feel quit right yet, I agree with Jonathan than the accessor name is misleading especially as it's not only acting as a check on the tmp_holdsqueue but also the system preference. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #8 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- I'm not familiar enough with the logic in this area now I'm afraid... but I do wonder a few things: 1) Should it really be an ON DELETE CASCADE.. or should we be setting to NULL or something to allow the hold to be reassigned to another item perhaps? 2) I don't like the accessor name as above 3) Should be trivial to correct the DB update to catch bad rows and clean them up before adding the key.. but it kind of depends what the answer to point 1 is to know what route to take (set to null or delete row) -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #9 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- (In reply to Martin Renvoize from comment #8)
I'm not familiar enough with the logic in this area now I'm afraid... but I do wonder a few things:
1) Should it really be an ON DELETE CASCADE.. or should we be setting to NULL or something to allow the hold to be reassigned to another item perhaps?
Reminding myself now, looks like the whole table is cleared down as part of every run of the cronjob.
2) I don't like the accessor name as above
Still outstanding
3) Should be trivial to correct the DB update to catch bad rows and clean them up before adding the key.. but it kind of depends what the answer to point 1 is to know what route to take (set to null or delete row)
Lets go ahead and Delete -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89707|0 |1 is obsolete| | --- Comment #10 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89736 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89736&action=edit Bug 22899: Database update Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89708|0 |1 is obsolete| | --- Comment #11 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89737 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89737&action=edit Bug 22899: [DO NOT PUSH] Schema updates Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #89725|0 |1 is obsolete| | --- Comment #12 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89738 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89738&action=edit Bug 22899: Add pending_hold method to Koha::Item To test: 1 - Enable course reserves 2 - Create a course 3 - Add an item to the course 4 - Attempt to view the course on the OPAC 5 - Internal Server Error 6 - Apply patch 7 - Add an item to the holds queue by placing a hold and running holds queue builder or: INSERT INTO tmp_holdsqueue (itemnumber) VALUES (###); 8 - View the course page, note item appears 'Pending hold' 9 - Remove the holdsqueue line 10 - View the course page, note item appears 'Available' 11 - prove -v t/db_dependent/Koha/Item.t Signed-off-by: Hayley Mapley <hayleymapley@catalyst.net.nz> I see Jonathan's comments about small improvements, but will sign off as everything works as expected here. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #13 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89739 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89739&action=edit Bug 22899: (QA follow-up) Ensure constraint is created Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 --- Comment #14 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Created attachment 89740 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=89740&action=edit Bug 22899: (QA follow-up) Change accessor name This patch changes pending_hold to has_pending_hold to signify that we're returning a boolean and not a Koha::Hold object. Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Signed Off |Passed QA --- Comment #15 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Right, with these two followups I think I'm happy to add my PQA stamp. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Nick Clemens <nick@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Passed QA |Pushed to Master --- Comment #16 from Nick Clemens <nick@bywatersolutions.com> --- Awesome work all! Pushed to master for 19.05 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |gmcharlt@gmail.com --- Comment #17 from Galen Charlton <gmcharlt@gmail.com> --- As this is also a regression in 18.11.05, I request that this be backported to 18.11.x or that the patch for bug 15505 be reverted from 18.11.x. -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Galen Charlton <gmcharlt@gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |regression -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|Pushed to Master |Pushed to Stable --- Comment #18 from Martin Renvoize <martin.renvoize@ptfs-europe.com> --- Pushed to 18.11.x for 18.11.06 -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Martin Renvoize <martin.renvoize@ptfs-europe.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version(s)| |19.05.00, 18.11.06 released in| | -- You are receiving this mail because: You are watching all bug changes.
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=22899 Lucas Gass <lucas@bywatersolutions.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |lucas@bywatersolutions.com --- Comment #19 from Lucas Gass <lucas@bywatersolutions.com> --- didn't backport 15505 to 18.05.x, wont backport this -- You are receiving this mail because: You are watching all bug changes.
participants (1)
-
bugzilla-daemon@bugs.koha-community.org