Conjoined items do not display without an extra copy attached to the record

Bug #1703678 reported by Dan Scott
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Evergreen
Fix Released
Undecided
Unassigned
2.12
Fix Released
Undecided
Unassigned

Bug Description

* Evergreen 2.10+

The stock template for copy table display (Open-ILS/src/templates/opac/parts/record/copy_table.tt2) includes a condition for the entire table:

[%- IF has_copies; %]

However, foreign copies from conjoined items are stored in $ctx->foreign_copies and displayed in the table inside of that conditional statement. If there is a normal copy attached to the record, then the foreign copies will also be displayed--and that's what we have in our Concerto test cases.

However, if there is no normal copy attached to the record, then foreign copies are not displayed.

The solution (discovered independently by Dan Wells and Dan Scott) is to make has_copies true if $ctx->foreign_copies exists; a simple change to:

[%- IF has_copies OR $ctx->foreign_copies; %]

will suffice.

Tags: pullrequest
Revision history for this message
Dan Wells (dbw2) wrote :

Here are a couple quick branches that implement the change mentioned above.

For master:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dbwells/lp1703678_show_foreign_copies

working/collab/dbwells/lp1703678_show_foreign_copies

For 2.12, etc.:
http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/collab/dbwells/lp1703678_show_foreign_copies_2_12

working/collab/dbwells/lp1703678_show_foreign_copies_2_12

The 2.12 version is what we are running in production, but master had some nearby changes, so that patch did not apply cleanly. The branch provided seems like a simple conflict resolution, but is untested, so please take additional caution.

Dan S. also noted in IRC that a few other changes may be needed to polish up foreign copy support, so other patches may yet be incoming.

Revision history for this message
Dan Scott (denials) wrote :

I've added a commit to add copy location and status display for foreign copies to the collab branches.

We're still missing a display of the due date but I'm not sure we can properly display that due to client/server differences, formatting consistency, etc, and would thus prefer to flag that issue in a separate bug.

Dan Scott (denials)
Changed in evergreen:
milestone: none → 3.0-alpha
Dan Scott (denials)
no longer affects: evergreen/2.11
Dan Scott (denials)
no longer affects: evergreen
Changed in evergreen:
milestone: none → 3.0-alpha
Dan Scott (denials)
no longer affects: evergreen/3.0
Revision history for this message
Dan Scott (denials) wrote :

Quick note: even with these patches in place, there is no foreign item display in the XUL client. However, the patches do enable the display in the web staff client, so I think we can live without a fix for XUL.

Revision history for this message
Dan Scott (denials) wrote :

Pushed one more commit, which should probably be rebased and squashed, as I had inadvertently included location in the status name field (sigh).

Dan Scott (denials)
tags: added: pullrequest
Revision history for this message
Dan Scott (denials) wrote :

Signed off on Dan Wells' commit and squashed and rebased my additional commit on current master (to resolve a conflict with the copy info due date fix from da6075828f9) and rel_2_12:

* master http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1703678_show_foreign_copies
* rel_2_12: http://git.evergreen-ils.org/?p=working/Evergreen.git;a=shortlog;h=refs/heads/user/dbs/lp1703678_show_foreign_copies_2_12

Revision history for this message
Dan Scott (denials) wrote :

See bug 1712362 "Conjoined items do not display unless there are two or more in a set" for a related display issue.

Changed in evergreen:
assignee: nobody → Mike Rylander (mrylander)
Revision history for this message
Mike Rylander (mrylander) wrote :

I've pulled these into master and 2.12. Thank, Dan**2!

Changed in evergreen:
status: New → Fix Committed
assignee: Mike Rylander (mrylander) → nobody
Changed in evergreen:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.