Bug 30801

Summary: OPAC and staff interface show 856 as link even if there is no $u (MARC21)
Product: Koha Reporter: Caroline Cyr La Rose <caroline.cyr-la-rose>
Component: MARC Bibliographic data supportAssignee: Bugs List <koha-bugs>
Status: NEW --- QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: alexbuckley
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:

Description Caroline Cyr La Rose 2022-05-18 15:11:25 UTC
Hi everyone,

If any 856 subfield is filled, the OPAC and staff interface show that information as a link (blue text, clickable, etc.) and uses the content of $u as the href. Which is OK. 

However, if there is no $u, the other subfields still appear as links.

Cases where the electronic resource is a file that is not online would not have a $u.

I'm no cataloging expert, but I think only $u and $y (and maybe $a/$d/$f but I'm not knowledgable enough about those subfields to say for sure) should appear as a link and the rest should be regular text.

Test plan:
1- Create a record
2- Fill in the required fields
3- In 856, fill in $3 with 'In-library access only'
4- Save
5- Click on 'Normal' to view the record
   Note that the text from 856$3 is a link, if you try clicking on it, nothing happens
6- Click on the OPAC view link
   Note that the text from 856$3 is a link, if you try clicking on it, nothing happens