Bug 36111 - 856$h should not appear as a link in detailed record
Summary: 856$h should not appear as a link in detailed record
Status: Signed Off
Alias: None
Product: Koha
Classification: Unclassified
Component: MARC Bibliographic data support (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal (vote)
Assignee: Matthias Le Gac
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-02-15 21:52 UTC by Caroline Cyr La Rose
Modified: 2024-04-20 18:52 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This fixes the display of 856$h (used to store non-functioning URLs) so that URLs in 856$h are not displayed for search results and detail pages in the staff interface and OPAC. Previously, if a record had data in 856$h, a link "Click here to access online" appeared when it should not be displayed. Other URLs should continue to be displayed where they should, such as 856$u.
Version(s) released in:


Attachments
Bug 36111: 856$h should not appear as a link in detailed record (37.84 KB, patch)
2024-02-21 17:16 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (37.89 KB, patch)
2024-02-24 22:16 UTC, David Nind
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (39.88 KB, patch)
2024-02-24 22:39 UTC, David Nind
Details | Diff | Splinter Review
Bug 36111: removes display of fields 856 if not 856 (4.84 KB, patch)
2024-03-25 20:40 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: removes display of fields 856y3z if not 856u (4.84 KB, patch)
2024-03-27 19:18 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: removes display of fields 856y3z if not 856u (6.88 KB, patch)
2024-03-29 20:13 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (39.92 KB, patch)
2024-04-02 14:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36111: removes display of fields 856y3z if not 856u (6.93 KB, patch)
2024-04-02 14:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (39.98 KB, patch)
2024-04-04 15:25 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: removes display of fields 856y3z if not 856u (4.84 KB, patch)
2024-04-04 15:30 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (22.39 KB, patch)
2024-04-05 13:24 UTC, Matthias Le Gac
Details | Diff | Splinter Review
Bug 36111: 856$h should not appear as a link in detailed record (22.44 KB, patch)
2024-04-20 18:52 UTC, Roman Dolny
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-02-15 21:52:45 UTC
The newish MARC21 field 856$h is used to store non-functioning urls. However, if a record has data in 856$h (or any 856 subfield), a link "Click here to access online" appears in the results list and detailed record in the opac and the staff interface.

To replicate:
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

I don't think 856$h should trigger the link to appear. 

I managed to hide it from the OPAC by making 856$h invisible in the OPAC, but the link is still there in the staff interface and still leads nowhere...

In my opinion, if 856$h is to be displayed, it should only appear in the staff interface detailed record (not results list or opac), and only be regular text, not a link, with the mention (non functional).
Comment 1 Caroline Cyr La Rose 2024-02-15 21:53:36 UTC
Info about 856
https://www.loc.gov/marc/bibliographic/bd856.html

856$h Non-functioning Uniform Resource Identifier
Uniform Resource Identifier (URI), which is no longer functional, for example, due to link rot, content drift, etc.
Subfield $h may be repeated if there is more than one non-functioning URI. A note on the status change (including the date) may be added in either in subfield $x or subfield $z, depending on the local policy.
Comment 2 Caroline Cyr La Rose 2024-02-15 21:59:29 UTC
I also tried only filling out 856$s (file size) and the link appears.
Comment 3 Heather 2024-02-15 22:26:52 UTC
I was able to replicate this and IMO it's bad--very, very bad!  I even had "Is a URL:" in the Framework unchecked, and a clickable "Click here to access online" was still displayed.

I would completely hide this subfield in my OPAC *and* staff client, frankly!

(The label for the field should also be changed from "Processor of request" to "Non-functioning URI" to conform to the MARC21 standard. IMO.)
--h2
Comment 4 Caroline Cyr La Rose 2024-02-16 13:48:12 UTC
(In reply to Heather from comment #3)

> (The label for the field should also be changed from "Processor of request"
> to "Non-functioning URI" to conform to the MARC21 standard. IMO.)

This part was done in bug 34665. It's just that we don't update frameworks for existing installations.
Comment 5 Caroline Cyr La Rose 2024-02-16 13:52:40 UTC
(In reply to Heather from comment #3)

> I would completely hide this subfield in my OPAC *and* staff client, frankly!

I'm using this field for a migration where all the links have to be changed (the client is also changing their website at the same time, so the links won't work anymore). I'm using 856$h to store the "old" link. I think it's interesting to see it in the staff interface for that case, without having to go "edit" the record. But like we both mentioned, it should not trigger the link display.
Comment 6 Heather 2024-02-16 15:06:11 UTC
That's a great use of the field, Caroline--thank you for mentioning it!  (And that the frameworks aren't updated for existing installations--alerts me to some changes I might want to make!)

I could see this subfield being useful to use for staff access to a site vs. patron/public access, so it would be good to have this subfield display only in the staff client.
Comment 7 Matthias Le Gac 2024-02-21 17:16:14 UTC Comment hidden (obsolete)
Comment 8 Esther Melander 2024-02-23 17:27:03 UTC
I filed bug 36123 with my somewhat clumsy explanation on a related problem with configuring visibility for the 856 $u in the OPAC. The larger question is if 856$u is hidden, should any other fields with data still function as a link? I think no, especially if the URL checkbox is not checked for the other fields.
Comment 9 David Nind 2024-02-24 22:16:09 UTC Comment hidden (obsolete)
Comment 10 David Nind 2024-02-24 22:39:29 UTC
Created attachment 162406 [details] [review]
Bug 36111: 856$h should not appear as a link in detailed record

The newish MARC21 field 856$h is used to store non-functioning
URLs. However, if a record has data in 856$h (or any 856
subfield), a link "Click here to access online" appears in the
search results list and detailed record in the OPAC and the
staff interface.

This patch fixes this so that URLs in 856$h are not displayed
in the search results and record details pages.

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. Apply the patch
8. Replay steps 3 through 6, but this time, the "Online resources"
   field should not be present.
9. Edit the item and add a url in field 856$u
10. Replay steps 3 through 6, but this time, clicking on the link
    should take you to the URL specified in the 856$u field.

Signed-off-by: David Nind <david@davidnind.com>
Comment 11 David Nind 2024-02-24 22:48:35 UTC
For some reason, when I signed off the patch the test plan was not included. I have amended the patch to include a description and have added the (very good) test plan. Feel free to amend if I have not got it right.

I have also added Matthias as the assignee, changed the importance from enhancement to normal (as it is a bug), and added some text for the release notes.

Testing notes using koha-testing-docker (KTD):

1. If using Firefox, instead of a blank page nothing happens. You get a blank page using a Chromium-based browser (such as Chromium or Google Chrome).
Comment 12 Victor Grousset/tuxayo 2024-03-05 07:12:09 UTC
> For some reason, when I signed off the patch the test plan was not
> included. I have amended the patch to include a description and
> have added the (very good) test plan.

Thanks David for the help :)
 	
@Matthias I think that happens when the test plan is not written in the commit message but written in bugzilla's UI/git-bz when attaching a patch. The test plan needs to be in the commit message to be preserved between signoffs and in the Koha commit history.

---

If that can help someone to review this, here a git command to show the diff with additional colors for moved lines. To go more quickly and just checking that part of the stuff is just moved and not new or totally removed.

git show --color-moved --color-moved-ws=allow-indentation-change

That's was still not enough for me to be able to get a good grasp of this one, sorry ^^"
Comment 13 Matthias Le Gac 2024-03-05 17:03:03 UTC
(In reply to Victor Grousset/tuxayo from comment #12)
> > For some reason, when I signed off the patch the test plan was not
> > included. I have amended the patch to include a description and
> > have added the (very good) test plan.
> 
> Thanks David for the help :)
>  	
> @Matthias I think that happens when the test plan is not written in the
> commit message but written in bugzilla's UI/git-bz when attaching a patch.
> The test plan needs to be in the commit message to be preserved between
> signoffs and in the Koha commit history.
> 
> ---
> 
> If that can help someone to review this, here a git command to show the diff
> with additional colors for moved lines. To go more quickly and just checking
> that part of the stuff is just moved and not new or totally removed.
> 
> git show --color-moved --color-moved-ws=allow-indentation-change
> 
> That's was still not enough for me to be able to get a good grasp of this
> one, sorry ^^"

thank for the help, I need to amend the commit to attach the test plan ?
Comment 14 Victor Grousset/tuxayo 2024-03-05 23:54:29 UTC
No need, David did it when signing off :)
Comment 15 Matthias Le Gac 2024-03-25 20:40:14 UTC Comment hidden (obsolete)
Comment 16 Victor Grousset/tuxayo 2024-03-27 02:55:58 UTC
Hi :)

The second patch now duplicates the test plan of the 1st patch. That will cause confusion.

About the switch back to Needs Signoff: are the steps to test the additional changes the same? Or is there something additional to check about these latest changes?

The idea is that if someone would forget to apply the second patch, when testing, they should not get what is expected. Thus demonstrating that the test plan really tests the changes. If not, that means the test plan isn't complete enough.
No need to have manual tests showing every single change made by the patches. It's a balance to show enough of the functional changes and edge cases and to demonstrate that the related code works.
Comment 17 Matthias Le Gac 2024-03-27 18:24:08 UTC
Ok I understand I will change the plan test to test the fix
Comment 18 Matthias Le Gac 2024-03-27 19:18:08 UTC
Created attachment 164029 [details] [review]
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.
   
Before the second patch, if you put something in the 856$y field and there was nothing in the 856$u field, the text was displayed. 
Now, with the second patch, the problem has been solved.
Comment 19 Victor Grousset/tuxayo 2024-03-28 19:00:03 UTC
Thanks for the additional steps :)
The back to need signoff now is clear, there is additional behavior to test.

Remaining is the issue of the 1st patch having the old test plan. So there is duplication and someone coming to test is likely to miss the full test plan in the 2nd patch. And signoff without having actually tested the last changes.
Comment 20 Matthias Le Gac 2024-03-29 20:13:42 UTC
Created attachment 164151 [details] [review]
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.
Comment 21 Matthias Le Gac 2024-03-29 20:14:50 UTC
I put the test plan in the commit message
It's better now?
Comment 22 Owen Leonard 2024-04-02 14:05:19 UTC
Created attachment 164275 [details] [review]
Bug 36111: 856$h should not appear as a link in detailed record

The newish MARC21 field 856$h is used to store non-functioning
URLs. However, if a record has data in 856$h (or any 856
subfield), a link "Click here to access online" appears in the
search results list and detailed record in the OPAC and the
staff interface.

This patch fixes this so that URLs in 856$h are not displayed
in the search results and record details pages.

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. Apply the patch
8. Replay steps 3 through 6, but this time, the "Online resources"
   field should not be present.
9. Edit the item and add a url in field 856$u
10. Replay steps 3 through 6, but this time, clicking on the link
    should take you to the URL specified in the 856$u field.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 23 Owen Leonard 2024-04-02 14:05:22 UTC
Created attachment 164276 [details] [review]
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.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 24 Victor Grousset/tuxayo 2024-04-02 22:09:43 UTC
(In reply to Matthias Le Gac from comment #21)
> I put the test plan in the commit message

I missed that there was again the 1st mistake: so indeed the patch on comment 18 didn't have the test plan and it would have been lost on Owen's signoff. So thanks for fixing this. The most reliable approach is to not use the comment function when attaching patches. Everything related to the patch itself should be in the commit message. And additional comments should be written in a separate bugzilla comment.

> It's better now?

What I meant in comment 19 by duplication is that when looking at the latest version of :
- Bug 36111: 856$h should not appear as a link in detailed record
- Bug 36111: removes display of fields 856y3z if not 856u

they are 80% duplicate and it's the second one that is the complete one. So it's easy to miss.
To fix this, the full test plan should be put in the 1st commit. And it should be removed from the 2nd commit. So there is only one test plan and it's complete.
(there is a gotcha when doing back and forths for the 1st time with patches on bugzilla: grab the patches from bugzilla and not from your local branch before starting working on changes, to not loose the signoff that have been added here)
Comment 25 Victor Grousset/tuxayo 2024-04-02 22:10:18 UTC
@Owen when you signed-off, did you use the full test plan that is in the second commit?
Comment 26 Matthias Le Gac 2024-04-04 15:25:48 UTC
Created attachment 164429 [details] [review]
Bug 36111: 856$h should not appear as a link in detailed record

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.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Owen Leonard <oleonard@myacpl.org>


Current status: Signed Off
Comment 27 Matthias Le Gac 2024-04-04 15:30:35 UTC
Created attachment 164430 [details] [review]
Bug 36111: removes display of fields 856y3z if not 856u

Current status: Signed Off
Comment 28 Matthias Le Gac 2024-04-04 15:34:44 UTC

(In reply to Victor Grousset/tuxayo from comment #24)

I put the last test plan in the first commit and removed the test plan in the second commit.
Comment 29 Matthias Le Gac 2024-04-04 15:37:57 UTC
Philippe Blouin has asked me to simplify my changes, so I'm passing the task back to Failed QA until I attach the changes, which will have no impact on the test plan.
Comment 30 Matthias Le Gac 2024-04-05 13:24:31 UTC
Created attachment 164476 [details] [review]
Bug 36111: 856$h should not appear as a link in detailed record

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.
Comment 31 Matthias Le Gac 2024-04-05 13:28:35 UTC
When I had made my modifications in the first commit, I had indented the code, which generated a lot of differences with the code and didn't make it easy to understand where I had really made the modifications. So I redid the minimal changes, which had no impact on the test plan, and put them in the commit.
Comment 32 Victor Grousset/tuxayo 2024-04-17 19:16:01 UTC
Do you confirm the commit/patch "Bug 36111: removes display of fields 856y3z if not 856u" isn't needed anymore?

Asking in case there was a confusion about removing the duplicate test plan: it was about amending the commit to remove the duplicate test plan. And reattach it here which would replace the previous version.

Here what happened is that the 2nd commit isn't here anymore. But if the rework also made the 2nd commit totally unnecessary then, all good :)
Comment 33 Matthias Le Gac 2024-04-17 19:22:18 UTC
(In reply to Victor Grousset/tuxayo from comment #32)
> Do you confirm the commit/patch "Bug 36111: removes display of fields 856y3z
> if not 856u" isn't needed anymore?
> 
> Asking in case there was a confusion about removing the duplicate test plan:
> it was about amending the commit to remove the duplicate test plan. And
> reattach it here which would replace the previous version.
> 
> Here what happened is that the 2nd commit isn't here anymore. But if the
> rework also made the 2nd commit totally unnecessary then, all good :)

Yes, the commit/patch "Bug 36111 : suppresses the display of fields 856y3z if they are not 856u" is no longer useful because when I simplified my modifications I fussed the two commits to make it simpler and have a single commit/patch that has all the modifications with the least number of modified lines.
Sorry for the confusion.
Comment 34 Roman Dolny 2024-04-20 18:52:06 UTC
Created attachment 165236 [details] [review]
Bug 36111: 856$h should not appear as a link in detailed record

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.

Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl>