Bugzilla – Attachment 164151 Details for
Bug 36111
Online resource link should be based on the presence of 856$u (MARC21)
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36111: removes display of fields 856y3z if not 856u
Bug-36111-removes-display-of-fields-856y3z-if-not-.patch (text/plain), 6.88 KB, created by
Matthias Le Gac
on 2024-03-29 20:13:42 UTC
(
hide
)
Description:
Bug 36111: removes display of fields 856y3z if not 856u
Filename:
MIME Type:
Creator:
Matthias Le Gac
Created:
2024-03-29 20:13:42 UTC
Size:
6.88 KB
patch
obsolete
>From d526868e7c1fb9fb619e02020815120be7a11aaf Mon Sep 17 00:00:00 2001 >From: Matthias Le Gac <matthias.le-gac@inlibro.com> >Date: Mon, 25 Mar 2024 16:39:11 -0400 >Subject: [PATCH] Bug 36111: removes display of fields 856y3z if not 856u > >Test plan: >1. Add 856$h to MARC editor > 1.1. Go to Administration > MARC bibliographic frameworks > 1.2. Next to Default framework, click Actions > MARC structure > 1.3. Search for field 856 > 1.4. Click Actions > Edit subfields > 1.5. Click h > 1.6. Check the Editor box > 1.7. Click Save changes >2. Catalog a new record with a random URL in 856$h > 2.1. Go to Cataloging > 2.2. Click New record > 2.3. Fill out the mandatory fields (000, 003, 005, 008, 040$c, > 245$a, 942$c) > 2.4. Go to tab 8 and enter a value in 856$h > 2.5. Click Save (No need to add an item) >3. Search for the title in the staff interface (a large enough > search to have more than one result) > --> Notice it says "Online resources: Click here to access online" > 3.1. Try to click the link > --> Blank page >4. Access the detailed record in the staff interface > --> Notice it says "Online resources: Click here to access online" > 4.1. Try to click the link > --> Blank page >5. Search for the title in the opac (a large enough search to have > more than one result) > --> Notice it says "Online resources: Click here to access online" > 5.1. Try to click the link > --> Blank page >6. Access the detailed record in the opac > --> Notice it says "Online resources: Click here to access online" > 6.1. Try to click the link > --> Blank page >7. Edit the item and add a text in field 856$y >8. Access the detailed record in the staff interface > --> Notice it says what you put in 856$y field >9. Apply the patch >10. Replay steps 3 through 6, but this time, the "Online resources" > field should not be present. >11. Replay steps 7 through 8, but this time, what you put in 856$y > field should not be present. >12. Edit the item and add a url in field 856$u >13. Replay steps 3 through 6, but this time, clicking on the link > should take you to the URL specified in the 856$u field. >14. Replay steps 7 through 8, but this time, what you put in 856$y > field should be present and > clicking on the link should take you to the URL specified in the 856$u field. >--- > .../intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl | 5 +---- > .../prog/en/xslt/MARC21slim2intranetResults.xsl | 3 --- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl | 5 +---- > .../opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl | 5 +---- > 4 files changed, 3 insertions(+), 15 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >index f90a9c37a6..306de4de64 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetDetail.xsl >@@ -922,11 +922,8 @@ > > <xsl:if test="marc:datafield[@tag=856]"> > <xsl:variable name="hasCodeU" select="marc:datafield[@tag=856]/marc:subfield[@code='u']"/> >- <xsl:variable name="hasCodeY" select="marc:datafield[@tag=856]/marc:subfield[@code='y']"/> >- <xsl:variable name="hasCode3" select="marc:datafield[@tag=856]/marc:subfield[@code='3']"/> >- <xsl:variable name="hasCodeZ" select="marc:datafield[@tag=856]/marc:subfield[@code='z']"/> > >- <xsl:if test="$hasCodeU or $hasCodeY or $hasCode3 or $hasCodeZ"> >+ <xsl:if test="$hasCodeU"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856]"> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >index 3869b0e9c2..399be176bd 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >+++ b/koha-tmpl/intranet-tmpl/prog/en/xslt/MARC21slim2intranetResults.xsl >@@ -979,9 +979,6 @@ > > <xsl:if test="marc:datafield[@tag=856]"> > <xsl:variable name="hasCodeU" select="marc:datafield[@tag=856]/marc:subfield[@code='u']"/> >- <xsl:variable name="hasCodeY" select="marc:datafield[@tag=856]/marc:subfield[@code='y']"/> >- <xsl:variable name="hasCode3" select="marc:datafield[@tag=856]/marc:subfield[@code='3']"/> >- <xsl:variable name="hasCodeZ" select="marc:datafield[@tag=856]/marc:subfield[@code='z']"/> > > <xsl:if test="$hasCodeU or $hasCodeY or $hasCode3 or $hasCodeZ"> > <span class="results_summary online_resources"><span class="label">Online resources: </span> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >index c29f883572..48c9b402aa 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACDetail.xsl >@@ -1039,11 +1039,8 @@ > <!-- Image processing code added here, takes precedence over text links including y3z text --> > <xsl:if test="marc:datafield[@tag=856]"> > <xsl:variable name="hasCodeU" select="marc:datafield[@tag=856]/marc:subfield[@code='u']"/> >- <xsl:variable name="hasCodeY" select="marc:datafield[@tag=856]/marc:subfield[@code='y']"/> >- <xsl:variable name="hasCode3" select="marc:datafield[@tag=856]/marc:subfield[@code='3']"/> >- <xsl:variable name="hasCodeZ" select="marc:datafield[@tag=856]/marc:subfield[@code='z']"/> > >- <xsl:if test="$hasCodeU or $hasCodeY or $hasCode3 or $hasCodeZ"> >+ <xsl:if test="$hasCodeU"> > <span class="results_summary online_resources"> > <span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856]"> >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >index 532825938c..1eaf8442af 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/xslt/MARC21slim2OPACResults.xsl >@@ -1217,11 +1217,8 @@ > > <xsl:if test="marc:datafield[@tag=856]"> > <xsl:variable name="hasCodeU" select="marc:datafield[@tag=856]/marc:subfield[@code='u']"/> >- <xsl:variable name="hasCodeY" select="marc:datafield[@tag=856]/marc:subfield[@code='y']"/> >- <xsl:variable name="hasCode3" select="marc:datafield[@tag=856]/marc:subfield[@code='3']"/> >- <xsl:variable name="hasCodeZ" select="marc:datafield[@tag=856]/marc:subfield[@code='z']"/> > >- <xsl:if test="$hasCodeU or $hasCodeY or $hasCode3 or $hasCodeZ"> >+ <xsl:if test="$hasCodeU"> > <div class="results_summary online_resources"> > <span class="label">Online resources: </span> > <xsl:for-each select="marc:datafield[@tag=856]"> >-- >2.34.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 36111
:
162322
|
162405
|
162406
|
163876
|
164029
|
164151
|
164275
|
164276
|
164429
|
164430
|
164476
|
165236
|
165335
|
165346
|
165347
|
165355
|
165356
|
165688
|
165709
|
165710
|
165711
|
170437
|
170471
|
170474
|
170576