Bug 11179 - opac-course-details.pl shows item as available when it is checked out
Summary: opac-course-details.pl shows item as available when it is checked out
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Course reserves (show other bugs)
Version: master
Hardware: All All
: P5 - low minor (vote)
Target Milestone: ---
Assignee: Kyle M Hall
QA Contact: Jonathan Druart
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-31 18:27 UTC by Kyle M Hall
Modified: 2015-06-04 23:23 UTC (History)
4 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Bot Control: ---
When did the bot last check this:
Who signed the patch off:
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 11179 - opac-course-details.pl shows item as available when it is checked out (2.44 KB, patch)
2013-10-31 18:29 UTC, Kyle M Hall
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 11179 - opac-course-details.pl shows item as available when it is checked out (2.54 KB, patch)
2013-11-14 20:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out (3.37 KB, patch)
2013-11-14 20:46 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out (3.43 KB, patch)
2013-11-19 03:09 UTC, Liz Rea
Details | Diff | Splinter Review
Bug 11179 - opac-course-details.pl shows item as available when it is checked out (2.56 KB, patch)
2013-11-19 09:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out (3.49 KB, patch)
2013-11-19 09:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out (3.54 KB, patch)
2013-11-19 13:13 UTC, Kyle M Hall
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 2013-10-31 18:27:26 UTC
If an item is listed for a course and is checked out, the item will still show as being available from the course details page which lists all the items that are part of a course. This is due to the way the course reserves system handles items and issues separately, while item-status.inc assumes the due date has been embedded in items.datedue
Comment 1 Kyle M Hall 2013-10-31 18:29:21 UTC Comment hidden (obsolete)
Comment 2 Owen Leonard 2013-11-14 20:46:25 UTC Comment hidden (obsolete)
Comment 3 Owen Leonard 2013-11-14 20:46:34 UTC Comment hidden (obsolete)
Comment 4 Liz Rea 2013-11-19 03:09:26 UTC Comment hidden (obsolete)
Comment 5 Jonathan Druart 2013-11-19 09:02:40 UTC
QA comment:

Works as expected on both OPAC themes.
I am just wondering if we should not add a comment in the include file in order to explain why sometimes there is an issue parameter and sometimes not.
I think it can be confusing for new calls to this inc.

Marked as Passed QA.
Comment 6 Jonathan Druart 2013-11-19 09:03:00 UTC
Created attachment 23020 [details] [review]
Bug 11179 - opac-course-details.pl shows item as available when it is checked out

If an item is listed for a course and is checked out, the item will
still show as being available from the course details page which lists
all the items that are part of a course. This is due to the way the
course reserves system handles items and issues separately, while
item-status.inc assumes the due date has been embedded in items.datedue

Test Plan:
1) Create a course
2) Add an item to that course
3) Check the item out to a patron
4) View the course details from the opac
5) Note the status says "Available"
6) Apply this patch
7) Repeat step 4
8) Note the status no longer says "Available"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Comment 7 Jonathan Druart 2013-11-19 09:03:08 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2013-11-19 13:13:50 UTC
Created attachment 23028 [details] [review]
Bug 11179 [Follow-up] opac-course-details.pl shows item as available when it is checked out

This follow-up applies the same fix to the Bootstrap theme. This patch
also includes the changes to item-status.inc in the Bootstrap theme
which were made to the prog theme in Bug 10820: display item status as
lost if item is both lost and on loan.

Signed-off-by: Liz Rea <liz@catalyst.net.nz>
Bootstrap theme looking so nice. Also the patch works.

Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
Comment 9 Galen Charlton 2013-12-19 17:05:13 UTC
Pushed to master, along with a follow-up that adds a comment to item-status.inc to describe the parameters it accepts.  Thanks, Kyle and Owen!

However, the wart in the API that means that item.datedue is not always set, depending on how you retrieve the item, should be fixed.  In the long run, it should either never be necessary to supply a separate issues parameter to the template or it should always be necessary.
Comment 10 Fridolin SOMERS 2014-01-27 13:02:48 UTC
Patches pushed to 3.14.x, will be in 3.14.3.