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

Bug #1703678 reported by Dan Scott on 2017-07-11
This bug affects 1 person
Affects Status Importance Assigned to Milestone

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.

Dan Wells (dbw2) wrote :

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

For master:;a=shortlog;h=refs/heads/collab/dbwells/lp1703678_show_foreign_copies


For 2.12, etc.:;a=shortlog;h=refs/heads/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.

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) on 2017-07-12
Changed in evergreen:
milestone: none → 3.0-alpha
Dan Scott (denials) on 2017-07-12
no longer affects: evergreen/2.11
Dan Scott (denials) on 2017-07-12
no longer affects: evergreen
Changed in evergreen:
milestone: none → 3.0-alpha
Dan Scott (denials) on 2017-07-12
no longer affects: evergreen/3.0
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.

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) on 2017-08-18
tags: added: pullrequest
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;a=shortlog;h=refs/heads/user/dbs/lp1703678_show_foreign_copies
* rel_2_12:;a=shortlog;h=refs/heads/user/dbs/lp1703678_show_foreign_copies_2_12

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)
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  Edit
Everyone can see this information.

Other bug subscribers